You can put this solution on YOUR website! A,B,C can form a triangle so use law of cosines, where a,b,c are the sides opposite A,B,C respectively.
Similarly,
Replace this into your equation and you (should) obtain an identity. However, this part is awfully long so a more elegant solution would be nice. A similar solution would be to use the law of sines: