f(x)÷(x−√3)=f(x)÷((x2−3)÷(x+√3))=f(x)÷(x2−3)×(x+√3)
We need to get f(x) into the form (x−√3)q(x)+r so we need to find q(x) and r
First we need to divide x^3 + 5x^2 - 3x - 22 by x^2-3

Quotient = x Remainder = -22
So that f(x)x2−3=x−22x2−3
Then multiply this to x+sqrt3
(x−22x2−3)(x+√3)
=x2+√3x−22(x+√3)x2−3
=x2+√3x−22x−√3
There we have found q(x) and r
q(x) = x^2 + sqrt3 x r = -22