On Demand Review - Ch. 8, Sec. 8, #5

I don’t understand how these equations are being derived. Can you please explain?