Hi, I have an Internal Rate of Return question I need help with please.

I have been given the answer for r, which is 0.208, however I cannot understand how the following equation:

-300 + -300/(1+r) + 800/(1+r)^2 = 0

when multiplied by (1+r)^2, becomes:

300r^2 + 900r - 200 = 0

Could someone please explain step by step how this is achieved?

Thanks

Charlie