Solve for a side in right triangles