Also, note that 24 does not work for the extreme cases. When angle = 90, the resultant is 5 (Pythagoras.) But when the angle is 0, the answer must be 4-3=1 (it is, sqrt(25-24).) Finally, when the angle is 180, the length of the side must be 4+3=7. The only way you can get there is sqrt(25-24cos(180)) = sqrt(25+24) = sqrt(49) = 7.
Dang it. I forgot that. Well done.