Black is moving top to bottom. At least that is the assumption I make when the diagram is presented without coordinates (it is confirmed once you see the notation in the solution). So there is no possibility of a pawn move. the only other possibilites are the king going to the h-file and then Bf5 is checkmate.
When I first saw the puzzle I was mildly annoyed because, really, who cares about a mate in 2 when white has such a material advantage. But then, when I ultimately was unable to figure it out, I appreciated the fact that it is a very good puzzle. So thanks.