We search then to write this as (Descartes method) :
(x2+px-u)(x2-px-v) = 0
Expanding and equating the two expressions results into :
-a = (u+v)+p2 and (u+v)2=(a+p2)2
b = p(u-v) and b2 = p2(u-v)2 = p2((u+v)2-4uv)
c = uv
Let Z = p2 and eliminate (u+v)2 and uv from the previous system, this gives : b2 = Z((a+Z)2-4c)
And the resolvant third degree equation :
|Z3+2aZ2+(a2-4c)Z-b2 = 0|
Each of the roots of this equation gives a set of values for p, u and v.
But globally, this is the same as exchanging the roots of the 4th degree equation,
and we can choose any root, namely Z1.
Then (x1,x2) are roots of x2+px-u = 0 and (x3,x4) roots of x2-px-v = 0
Specifically x1+x2 = -p = -√Z1 and x3+x4 = p = √Z1
Exchanging the roots gives similarily :
x1+x3 = -√Z2, x2+x4 = √Z2 and x1+x4 = -√Z3, x2+x3 = √Z3
By linear combination of these expressions we get the roots of the 4th degree equation :
x1 = 1/2 (-√Z1-√Z2-√Z3)
x2 = 1/2 (-√Z1+√Z2+√Z3)
x3 = 1/2 (√Z1-√Z2+√Z3)
x4 = 1/2 (√Z1+√Z2-√Z3)
with Zi solutions of Z3+2aZ2+(a2-4c)Z-b2 = 0
As for the 3rd degree equation, these formulaes are useless in practice.
Practically, solving a 4th degree equation is through numeric approximations,
except specific cases or trivial solutions.
A script for solving through Newton method.
Note also that although formulaes with square and cubic roots exist for the generic equations of degree 2, 3 and 4, there can't be any such formula for generic equations of degree 5 and more (see Abel and Galois theory).