I'm currently studying for my exam at my uni so i'm going through al the past exam papers. and i got stuck at one of the questions.

I have attached the question and the solution to the question. What I dont understand is in the solution section. I wasn't sure how to get from the second equation to the third equation.

please help!!!