Multiply both sides by x
x^2 + 1 = 3x
x^2 - 3x + 1 = 0
Completing the square
x^2 - 3x + (1.5)^2 - 1.25 = 0
(x - 1.5)^2 = 1.25
x - 1.5 = +- sr(1.25)
x = 1.5 +- sr(1.25)
x = 2.61803… or 0.381966…
You could use the quadratic formula x = (-b +- sr(b^2 - 4ac)) / 2a where ax^2 + bx + c = 0