Can someone explain the second equalities on the second (and third) lines of this attachment i.e. the two equalities in which there are curly braces on the RHS.
Ehrenfest, these two equations are very straight-forward and you can do it yourself with no trouble. I suggest you try it again and in the unlikely event that you still don't get it, post your efforts so we can see where you are going wrong.