Let y=x+1/x, then y2-5y-12=0, y2-5y=12.
Complete the square:
y2-5y+25/4=12+25/4,
(y-5/2)2=73/4,
y=5/2±√73/2. The quadratic formula gives the same results.
y=x+1/x, so xy=x2+1, x2-xy+1=0.
Using the formula: x=(y±√(y2-4))/2.
One of the values for y (=5/2-√73/2) is less than 4 so that would lead to a complex result. I'm assuming that you are only interested in real results.
Therefore we use y=5/2+√73/2=6.7720 approx.
This produces the results for x=6.6210 or 0.1510.