if (f(x)-4)/(x-3)=3 when x -> 3, the denominator must drop out because otherwise the denominator is zero.
Therefore the numerator must have a factor (x - 3) as well. And the value of the numerator when x = 3 must be 3.
So f(x) - 4 must have a factor (x - 3) and (x + a)
And x + a - 4 = 3 when x = 3 which means a = 4
Therefore f(x) = (x - 3)(x + 4) = x2 + x - 12
Now you can do the second question in a similar way.