Two methods:
1) Multiply everything by #x# first to get #x^2+1+x=4x#, or #x^2-3x+1=0#. The quadratic formula now gives #x=\frac{3\pm sqrt{9-4}}{2}=\frac{3\pm sqrt{5}}{2}\approx 2.618, 0.382#.
2) Add the fractions on the left first by getting a common denominator of #x#:
#x^2/x+1/x+x/x=4\Rightarrow (x^2+x+1)/x=4/1#
Now "cross-multiply" to get #x^2+x+1=4x#, or #x^2-3x+1=0#. This gives the same answer now as Method 1: #x=\frac{3\pm sqrt{9-4}}{2}=\frac{3\pm sqrt{5}}{2}\approx 2.618, 0.382#.
As with all algebra problems like this, you should check the answers in the original equation. If you try this with, for example, #x=(3+sqrt{5})/2# in exact form, you'll get:
#x+1/x+1=(3+sqrt{5})/2+2/(3+sqrt{5})+1#
#=((3+sqrt{5})(3+sqrt{5})+2*2+2(3+sqrt{5}))/(2(3+sqrt{5}))#
#=(9+6sqrt{5}+5+4+6+2sqrt{5})/(6+2sqrt{5})=(24+8sqrt{5})/(6+2sqrt{5})#
#=(4(6+2sqrt{5}))/(6+2sqrt{5})=(4cancel((6+2sqrt{5})))/(cancel(6+2sqrt{5}))=4#