$f(x)$ is a quadratic polynomial with $f(0)\neq 0$ and $f(f(x)+x)=f(x)(x^2+4x-7)$ 
$f(x)$ is a quadratic polynomial with $f(0) \neq 0$ and $$f(f(x)+x)=f(x)(x^2+4x-7)$$
It is given that the remainder when $f(x)$ is divided by $(x-1)$ is $3$.
Find the remainder when $f(x)$ is divided by$(x-3)$.


My Attempt:
Let $f(x)=ax^2+bx+c$ and $a,c \neq 0 $
I got $a+b+c=3$
And by the functional equation
$a[ax^2+(b+1)x+c]^2+b[ax^2+(b+1)x+c]+c= [ax^2+bx+c][x^2+4x-7]$
Then by putting $x=0$ , $ac^2 +bc+c=-7c$
Since $c \neq 0 $ , we have $ac+b+8=0$
Then comparing the coeffiecient of $x^4$ , we get $a^3=a$
Since $a \neq 0$ , $a=-1 $ or $a =1 $
Then how to proceed with two values of $a$ ?
or Is there a polynomial satisfying these conditions?

$ac + b + 8=0$, $ac - a - c + 11 = 0$. If $a = 1$, then $10 = 0$. So $a = -1$, hence $c = 6$, $b = -2$, $f(x) = -x^2 -2x + 6$
