a^2 = k(k-u)(k-v)(k-w) where 2k = u+v+w
Given a, u and v, w = ?
This is basically Heron's formula. So, if you know the area of the triangle and the lengths of two of its sides, then $w$ is the length of one of the sides.
So, we have $a = \dfrac{1}{2}uv\sin \gamma$ where $\gamma$ is the angle between $u$ and $v$.
We also have (by the law of Cosines): $w^2 = u^2+v^2-2uv\cos \gamma$ (again, where $\gamma$ is the angle between $u$ and $v$).
So, we have $\sin \gamma = \dfrac{2a}{uv} = \dfrac{\text{opp}}{\text{hyp}}$, so $\cos \gamma = \dfrac{\text{adj}}{\text{hyp}} = \dfrac{\sqrt{u^2v^2-4a^2}}{uv}$.
This gives $w = \sqrt{u^2+v^2-2\sqrt{u^2v^2-4a^2}}$
I think the first - sign should be a $\pm$. One of those will give the correct answer. We just need to figure out which. We will have to use guessing and checking.
With the - sign as is, it worked with u=4,v=15 and with u=13,v=15. It did not work with u=4,v=13.
With the - sign changed to a +, it worked with u=4,v=13, but not with the other two.
I think this is because $\cos \gamma$ could be negative (if $\gamma > \dfrac{\pi}{2}$), but $\dfrac{\sqrt{u^2v^2-4a^2}}{uv}>0$ always (so long as it is a valid triangle).
Edit: Yes, it is definitely a $\pm$. It could be either. Example: $u=4,v=13,w=\sqrt{145},a=24$ works just as well as $u=4,v=13,w=15,a=24$.
This gives:
$$w = \sqrt{u^2+v^2 \pm 2\sqrt{u^2v^2-4a^2}}$$
Two addendums:
It is possible for $w $ to be negative. Example: $u=4,v=13,w=-15,a=24$
So there is another $\pm $ on the entire formula. This gives four solutions for $w $ which makes sense given that the original equation works out to a 4th degree polynomial in $w $.
Second issue: the creation of the formula relied on $uv $ in the denominator. We should consider either value being zero as a degenerate case and solve that separately.