if this can help, there is a little mistake in your cosin formula : it is c^2=a^2+b^2-2ab*cos(gamma) instead of c^2=a^2+b^2-2ab-cos(gamma)
(between the ab and the cos(gamma) there is multiplication and not subtraction).
If you want more info, it would be good if you can post a figure because I did not understand all your problem. You say : they formed (why in the past, don't they in your actual problem) the angle 60 degrees. Find the nearest sides of the angle. The third angle is 21 cm (an angle in cm ?).