If we can write the given polynomial as
[tex]\underbrace{p(x)}_{\text{given}}=q(x)(x-3)+r(x)[/tex]
that is, write [tex]p(x)[/tex] as the product of two factors plus some remainder term, then we can simply plug in [tex]x=3[/tex] to determine the remainder term because that would force the [tex]q(x)[/tex] term to vanish.
[tex]p(x)=x^4-3x^2-9x+4\implies p(3)=31[/tex]
so the remainder upon dividing [tex]p(x)[/tex] by [tex]x-3[/tex] is 31.