You must guard against division by zero. When you "cancel out $t^2$", you are dividing both sides of your equation by $t^2$. Consequently, the correct form of inference is
$$\begin{align*}
2t^2+t^3 &= t^4 & & \\
2 + t &= t^2 \qquad \text{ or } \qquad t^2 = 0.
\end{align*}$$
The resulting left choice has the solution set $\{-1,2\}$ and the resulting right choice has the solution set $\{0,0\}$, which together are the solution set of the first equation.
Note that the same thing happens in reverse. Multiplying both sides of an equation by zero can result in craziness. We can agree that $1 \neq 2$, but this does not mean $0 \cdot 1 \neq 0 \cdot 2$ because both sides of this are zero. It can be harder to see when one is doing this when using a more complicated expression that is only sometimes zero. For instance,
$$\begin{align*}
2 + t &= t^2 \\
t^2(2 + t) &= t^4 \qquad \text{ and } \qquad t^2 \neq 0 \\
2t^2+t^3 &= t^4 \qquad \text{ and } \qquad t^2 \neq 0
\end{align*}$$
The left choice has solution set $\{-1,0,0,2\}$ and the right choice has solution set $\{0,0\}$. The (set) difference of these is $\{-1,2\}$, the solution set of the first equation.
None of this is hard to see when multiplying or dividing by constants. Either the constant is nonzero and everything works or the constant is zero and everyone can see that something bogus is going on. However, when we're not just using constants, a little more care is needed.