[tex]F=mg\ \ \ |:m\\\\g=\frac{F}{m}[/tex]
[tex]E=\frac{1}{2}mV + mgh\\\\mgh=E-\frac{1}{2}mV\ \ \ |:mh\\\\g=\frac{E-\frac{1}{2}mV}{mh}\\\\g=\frac{2E-mV}{2mh}[/tex]