Either you take a peek at the "help with Latex" section to learn how to properly write maths or else add enough parentheses to make your mathematical expressions clear!

What has to be done is some basic algebraic manipulations which are very important to get along with maths:

...

Tonio