Doubt by Sankalp

I did not understod the last step of example take in above video

Answers

Answer by Abhishek Sir-NeetPrep

Point B is taken as reference for gravitational potential energy. So all heights will be calculated from B. Simple!!