Please give an explanation to the solution

please give and explanation to the solution and also tell how it is happening