The diagram shows a cubic curve passing through (–1, 0), (2, 0) and (0, –8).
What is the equation of the curve.
So I would have said:
$-8 = k(x + 1)(x-2)$
$k = 4$
$y = 4(x+1)(x-2)$ but the root at 2 is repeated, how would I have been able to spot this?

Because there is no sign change at $x=2$.
At a simple root (or more generally a root of odd order), a polynomial changes its sign. Indeed, if $a$ is a root of $f$, then we can write $f(x)=(x-a)g(x)$, and as $x-a$ changes its sign at $x=a$, we either have that $f$ changes its sign and $g$ doesn't (though it might still happen that $g(a)=0$), or - and that applies to the OP example - $f$ does not change its sign and hence $g$ changes its sign - which means that $g(a)=0$ and so $a$ is a multiple root of $f$.