If you failed a puzzle it means your move wasn't winning.
The engine won't always play the best move for the other side... that doesn't change the fact that your moves have to be winning.
I'm guessing you played rook takes queen for your 2nd move because you didn't notice your queen on b5 was hanging. White's 3rd move (e3 or not) has nothing to do with that.
This is what the puzzle played
1. a4 Rh1+ 2. Kf2 Qb6+ 3. Kg3 Rxd1 4. Re8+ Rd8 5. Rxd8+ Kxd8 {*}
Puzzle didn’t play the best engine move 3....e3, which made my line choice incorrect. What can I learn from this?