Instead of trying to do these formulas, I solve these questions by calculating cash flows. For example, if you want to borrow USD to fund a carry trade into EUR:
Step1: Borrow 100 USD at 3% interest —> pay back 103 at end of cycle
Step2: 100 USD to EUR based on Spot rate --> 102 (just making up a number here, as you didnt post the spots)
Step3: 102 Eur at 5% interest -->107.1 Eur
Step4: 107.1 EUR to USD based on the Forward or future rate --> 104 (just making up a number)
Step5: Pay back the loan of 103 results in a $1 gain
I always get mixed up with the spots/par/zero rates … and future spot / forwards , etc… Luckily, the questions usually just provide one rate to use (but not always)