What a prowess, @Piquito ! Here is another way of treating this issue.
Its "pros": it is systematic. Its "cons": it necessitates a computer algebra system (I used Mathematica).
Let us give the following numbers to the 3 equations:
$$\begin{cases}a^2+\sqrt 3ab+b^2&=&25 \ \ &(1)\\b^2+c^2&=&9 \ \ \ \ \ &(2) \\a^2+ac+c^2&=&16 \ \ \ &(3)\end{cases}$$
Let us consider equations (1) and (3) as quadratics in $a$.
They must have a common root. This can be expressed by setting their resultant to $0$ (https://en.wikipedia.org/wiki/Resultant):
This gives:
$$81 - 66b^2 + b^4 + 41\sqrt{3}bc - \sqrt{3}b^3c - 7c^2 + 2b^2c^2 -
\sqrt{3}bc^3 + c^4=0 \ \ \ (4)$$
Now, we use constraint (2) meaning that point $(b/3,c/3)$ is on the unit circle, a constraint that we can translate into the following one (classical parameterization of the unit circle https://en.wikipedia.org/wiki/Tangent_half-angle_formula):
$$b = 3\dfrac{1 - t^2}{1 + t^2}, \ \ c = 3\dfrac{2 t}{1 + t^2} \ \ \ (5)$$
for a certain $t \in (-\infty,+\infty)$. Plugging (5) into (4) gives:
$$12 - 16\sqrt{3}t - 35t^2 + 16\sqrt{3}t^3 + 12t^4=0 \ \ \ (6)$$
This antipalindromic (https://en.wikipedia.org/wiki/Reciprocal_polynomial) 4th degree polynomial has four explicit (real) solutions
$$t=\dfrac{1}{12}(\pm9-4\sqrt{3}\pm\sqrt{273-72 \sqrt{3}}) \ \ \ (7)$$
(the two $\pm$ signs are independant: their four combinations are valid).
The objective of finding the value of
$$X = ab+ 2cb+\sqrt3 ac$$
is now within reach, because we are able to express it as an expression of $t$ alone, because:
this is the case for $b$ and $c$ (formulas (5)).
Concerning $a$, being the solution of quadratic equation (3), can be expressed as a function of $c$, itself function of $t$.
Then, it remains to check that, whatever the root chosen in (7), one gets the same result $X=24$. This is the case.