Solving for missing side in a right triangle