The ODE is separable: We can write
[tex]f'(x)=f(x)^2\implies\dfrac{\mathrm df}{\mathrm dx}=f^2\implies\dfrac{\mathrm df}{f^2}=\mathrm dx[/tex]
Integrating both sides gives
[tex]-\dfrac1f=x+C[/tex]
so that
[tex]f(0)=1\implies-1=C[/tex]
and so
[tex]-\dfrac1f=x-1\implies f(x)=\dfrac1{1-x}[/tex]
Then [tex]f(6)=-\frac15[/tex], making [tex]n=-5[/tex].