TeX source:
\begin{aligned} v_{\mathrm{f}} &=\sqrt{\frac{k x_{\mathrm{i}}{ }^{2}}{m}-2 g h_{\mathrm{f}}} \\ &=\sqrt{\left(\frac{250.0 \mathrm{~N} / \mathrm{m}}{0.100 \mathrm{~kg}}\right)(0.0400 \mathrm{~m})^{2}-2\left(9.80 \mathrm{~m} / \mathrm{s}^{2}\right)(0.180 \mathrm{~m})} \\ &=0.687 \mathrm{~m} / \mathrm{s} \end{aligned}