easy
[tex](\frac{1}{2})(m)*(v_i)^2+m*g*h_i=(\frac{1}{2})m*(v_f)^2+m*g*h_f[/tex]
[tex]minus \space\ m*g*h_f[/tex] from both sides
[tex](\frac{1}{2})(m)*(v_i)^2+m*g*h_i-m*g*h_f=(\frac{1}{2})m*(v_f)^2[/tex]
times both sides by 2/1
[tex](m)*(v_i)^2+2m*g*h_i-2m*g*h_f=m*(v_f)^2[/tex]
square root both sides
[tex]\sqrt{(m)*(v_i)^2+2m*g*h_i-2m*g*h_f}=v_f[/tex]
[tex]v_f=\sqrt{(m)*(v_i)^2+2m*g*h_i-2m*g*h_f}[/tex]