First, 5 is the same as 0 in $\Bbb Z_5$. With this in hand, it becomes obvious that both generators are multiples of $x$, and therefore $I$ is contained in the principal ideal $(x)$ (which is already a proper ideal, so $I$ is a proper ideal as well).
It is also trivial to see that in fact $I$ is equal to $(x)$, but why does that matter if the problem was to prove that $I$ is a proper ideal? The difference of the two generators is $x^2$, so $I$ contains $x^2$ and therefore $x^3$ as well, so it also contains $x$ because it contains $x^3+x$. So you get inclusions in both directions.
In $\Bbb Z_3$ 5 = -1, so the difference of the two generators is $x^2+1$. Both generators are divisible by $x^2+1$, so again you get $I=(x^2+1)$ by inclusion in both directions.