Hint: write out the cosine rule for this particular triangle, and then try to expand and move everything onto one side. You should now have a quadratic formula in terms of x - use the quadratic formula to solve for x.
Agree with your advice to write out the cosine rule, expand and move everything to one side, but the squared terms of x cancel out so the equation to solve isn’t a quadratic.
The question is ambiguously posed. If ‘x+4’ is the side opposite the angle of 60 degrees, then it can’t be the ‘longest‘ side since the other two angles must sum to 120 degrees, so since the triangle can’t be equilateral (x+4 is longer than x-4), one of the other angles is greater than 60 degrees and 13 is the length of the longest side (by logical elimination of x+4 and x-4 as possibilities for the longest side).
Nevertheless, I’ve tried to solve the problem as ‘x+4‘ being the side opposite the angle of 60 degrees, with ’x-4’ and 13 being the lengths of the other two sides:
(x+4)^2 = (x-4)^2 + 13^2 - 2(x-4)(13)cos60
x^2 + 8x + 16 = x^2 - 8x + 16 + 169 - 26x(sqrt3)/2 + 104(sqrt3)/2
8x = -8x + 169 -13x(sqrt3)+ 52(sqrt3)
16x + 13sqrt3x = 52sqrt3 + 169
x = (52sqrt3 + 169) / (13sqrt3 + 16)
Please excuse the clumsy notation.
On the other hand, if (x+4) really is the ‘hypotenuse’, then by definition, it must be opposite the right angle of a right angled triangle and there are two potential solutions. One with the side of length 13 opposite the angle of 60 degrees and the other with the side of length 13 opposite the angle of 30 degrees, but generally a problem eliciting the general cosine rule isn’t posed with a right angled triangle because then there are quicker ways to solve than the general cosine rule (such as Pythagoras equation or a simpler sine equation of a right angled triangle).
@Farhanthestudent005, when you encounter questions which are posed ambiguously in textbooks or revision sheets, just satisfy yourself that you can apply the required principle (in this case, the general cosine rule) to your best interpretation of the question.