x^2-3x+1=0
x^2+1=3x
x+1/x=3
(x+1/x)^2=9
x^2+2+1/x^2=9
x^2+1/x^2=7
x^3+1/x^3=(x+1/x)(x^2-1+1/x^2)=3x(7-1)=18