The purpose of the en passant rule is to give neighboring pawns one chance to capture. It doesn't make any difference which pawn gets that one chance to capture. In both the cases you mentioned, the pawn that just moved [the one that just double-stepped] could have captured the pawn that had moved up to a diagonally adjacent position, a pawns' mutual capture position, on a previous turn. Since the opportunity to capture was there, then the pawn that you are asking about cannot capture by an en passant move. Note that in a legal en passant move, the pawn moves 1 square diagonally forward, its standard capture move, whereas your suggested move would have the pawn capture with an orthogonally sideways move, one the pawn cannot make.
I hope this answers your question adequately.