Mate in 5
The solution is not correct. It's mate in 4. Here are all the lines.
1. g8=Q Kg1 2. Qg3! Kf1 3. h8=Q Kg1 4. Qh8a1#
1. g8=Q Kg1 2. Qg3! Kf1 3. h8=Q g1=Q 4. Qh8a1#
1. g8=Q Kg1 2. Qg3! Kh1 3. h8=Q+ Kg1 4. Qh8a1#
1. g8=Q Kh2 2. h8=Q+ Kg1 3. Qg3! Kg1 4. Qh8a1#
1. g8=Q g1=Q 2. h8=Q+ Qh2 3. Qh8a1 Qg1 4. QxQ#
If you need help, please contact our Help and Support team.