$\displaystyle f(x)$ is an identity function if $\displaystyle f(x) = x$. Therefore, $\displaystyle f(f(s))$ is an identity function if $\displaystyle f(f(s)) = f(s)$.
$\displaystyle f(f(s)) = af(s) + b = a(as + b) + b = a^2s + ab + b$
Solve the equation $\displaystyle a^2s + ab + b = as + b$ for $\displaystyle a$ and $\displaystyle b$.