[tex]18x^4=3x^2\cdot6x^2[/tex], and
[tex]6x^2(3x^2+3x+4)=18x^4+18x^3+24x^2[/tex]
Subtracting this from [tex]f(x)[/tex] gives a remainder of
[tex](18x^4+27x^3+39x^2+22x+11)-(18x^4+18x^3+24x^2)=9x^3+15x^2+22x+11[/tex]
[tex]9x^3=3x^2\cdot3x[/tex], and
[tex]3x(3x^2+3x+4)=9x^3+9x^2+12x[/tex]
Subtracting this from the previous remainder gives a new remainder of
[tex](9x^3+15x^2+22x+11)-(9x^3+9x^2+12x)=6x^2+10x+11[/tex]
[tex]6x^2=3x^2\cdot2[/tex], and
[tex]2(3x^2+3x+4)=6x^2+6x+8[/tex]
Subtracting this from the previous remainder gives a new remainder of
[tex](6x^2+10x+11)-(6x^2+6x+8)=4x+3[/tex]
[tex]4x[/tex] is not divisible by [tex]3x^2[/tex], so we're done. We ended up with
[tex]\dfrac{f(x)}{g(x)}=\underbrace{6x^2+3x+2}_{q(x)}+\underbrace{\dfrac{4x+3}{3x^2+3x+4}}_{r(x)}[/tex]