Solving for height of a prism