I think this is supposed to be over an arbitrary field $K$, but if it's only true when $K$ is, say, algebraically closed, then feel free to assume whatever conditions are required to make the statement true.
If $\varphi$ is a morphism between the two varieties, then $\varphi(z) = (f(z),g(z))$ for some polynomials $f$ and $g$ satisfying $g^2=f(f-1)(f+1)$. I think that this is probably the way to show that $f$ and $g$ must be constant, but I can only get superficial restrictions on $f$ and $g$. (Like $2\deg(g)=3\deg(f)$).
I think I'm probably missing something obvious but can't quite work out what it is.
I think the way you are approaching it is correct. You need to show that $f(f-1)(f+1)$ does not have a square root in $k[x]$ if $f$ is not constant.
Suppose you can find nonconstant $g$ and $f$ in $k[x]$ such that $$g^{2} = f(f+1)(f-1).$$ Then, this must be true if we pass to the algebraic closure of $k$. So assume $k$ is algebraically closed. Then, $g$ splits and is not a constant and hence we can write $$g(x) = \prod_{i=1}^{n} (x - \alpha_{i}).$$
Thus, we have $(x - \alpha_{i})^{2}$ divides the product $f$, $f - 1$, $f +1$, but these three polynomials are pairwise relatively prime and hence don't share an irreducible factor. Hence, $(x - \alpha_{i})^{2}$ divides one of the $f$, $f - 1$, $f + 1$. Additionally, if $x - \beta_{i}$ divides one of $f$, $f- 1$, $f + 1$, then it divides $g^{2}$ and hence $(x - \beta_{i})^{2}$ must divide one of $f$, $f - 1$, $f + 1$ since it divides their product.
The upshot of the above paragraph is that each of $f$, $f - 1$, $f + 1$ is a square in $k[x]$. But this is impossible unless $f$ is constant (you can prove this by inducting on degree if degree is positive.)