Difficult Chess Puzzle M1
The second solution is OK!
The first one is not as you can't expect puzzle solvers to try all "possible" e.p. moves in all puzzle diagrams to see if one solves the puzzle. The general consensus is that you can't play e.p. unless you can prove that the opponent played his 2-step pawn move just before it. You entered the e.p. possibility when you made the puzzle but that doesn't count as the solver can't see you did that. Puzzles must be solved in the mind and not by trying out moves against an engine.
That is one of the reasons why chess.com puzzles always show you the last move played. That tells you whether or not an e.p. move is on the card!