Every single energy problem can be handled with one master equation. One form of the equation is:
Ui + Ki + Wnc = Uf + Kf
U represents potential energy and K is kinetic energy.
Wnc represents work done by non-conservative forces (such as friction) as the system moves from the initial state (i) to the final state (f).