The equation editor (LaTeX) is curretly disabled because the site is under repair. Please try to understand this mess.
The first part you got correct, you checked .
The second part is,
Now, to get the next case you add to both sides, thus,
Now, add the fraction on the right hand side,
Thus, the right hand side, can be factored