Need help with this position
Well, sadly in this position there is no forced mate. Just because some positions seem similar doesn't mean the same moves will work in them. The best move here is to simply castle with a small advantage for white. Bxh7 trades a bishop for a pawn with no mate in sight (unless black blunders).
Basically, the less pieces your opponent has on the kingside, the more likely it is to work. Also if it's a closed position that helps a lot because your opponent can't get pieces over to the defense.
Also, I just composed that diagram, so it's likely to have some mistakes in it.
In the diagram, the sac worked because 1. there weren't any kingside defenders 2. white's e5 pawn gave him a space advantage and prevented f5 or e5 (attacking the queen) from being safely played and 3. the black queen's position allowed for some tactics on it
This is not necessarily winning for white and in that position there isn't a forced checkmate. Assuming best play on both sides, black can hold off the attack by white. I would say the problem with playing Bxh7+ in this position is that you really don't have enough pieces in position to attack.
Also, I just composed that diagram, so it's likely to have some mistakes in it.
In the diagram, the sac worked because 1. there weren't any kingside defenders 2. white's e5 pawn gave him a space advantage and prevented f5 or e5 (attacking the queen) from being safely played and 3. the black queen's position allowed for some tactics on it
Well, it's an illegal position for one thing. With pawns on e7 and g7, there is no legal way to get a B to a7.
Yeah I know. But I meant mistakes in the moves.