White could mate immediately with 1. Be5 if his queen weren’t in the way. But where can he move her? For example, if 1. Qg4 then 1. … Rh5 and White can’t mate on his next move. And if 1. Qc7, 1. … Rb8 and again White has no immediate win.
The answer is 1. Qb8!, threatening 2. Be5#. If Black takes the queen then 2. Bxb8 is mate. If 1. … Rh5 then 2. Nh3 is mate. And if Black shifts the rook along the b-file then White can choose a suitable bishop move to prevent it from interposing on the h-file: