Math problem with Inverse Kinematics