Have a look athttp://www.cut-the-knot.org/proofs/ptolemy.shtml#Mahavira
It's the same as Pierre's remark but perhas a little more detailed. What I want you to do is to make a diagram where you mark the angle theta and think of what cos(theta) signifies, OK?