After paying the down-payment (deposit) they will owe 340000-34000=306000.
They pay the balance of 306000 over 25 years, which is 50 half-years. The compound interest is evaluated every half year and the interest rate for a half-year is half of 5.1%=2.55%. We need to calculate how much 306000 will accumulate over 50 half-years=306000(1+0.0255)^50=306000*3.52195=1077716.82 to be paid over 25*12=300 months. The monthly payment is 1077716.82/300=3592.39 to the nearest cent or penny.
If this was an interest only mortgage repayment they would only pay for compound interest on 771716.82=2572.39 per month.