It seems to me that this argument is only half right and Hartshorne is also half right and there is a way to correct Hartshorne's statement in a simple way to make it right, so at the end it qualifies indeed to be a typo.

So, everything is obviously fine for $t\neq 0$ and also for $h^0$, but I think that for $t=0$ you get a global nilpotent on $\mathscr X_0$ (the closed subscheme defined by $\mathscr I_0\subset \mathscr O_{\mathbb P^4\times \mathbb A^1}$) from $x_2$. Notice that $x_2$ is obviously not defined on the entire $\mathbb P^4_{a=0}$ and is zero on $\mathbb P^3=(x_2=0)\subset \mathbb P^4_{a=0}$, but $\mathscr X_0\not\subset \mathbb P^3=(x_2=0)$ and it seems to me that $x_2\in H^0(\mathscr X_0,\mathscr O_{\mathscr X_0})$. In any case there are certainly no other global sections, so this means that $h^0(\mathscr X_0,\mathscr O_{\mathscr X_0})=2$ and hence $H^0(\mathbb P^4,\mathscr O_{\mathbb P^4})\to H^0(\mathscr X_0,\mathscr O_{\mathscr X_0})$ is not surjective and has a $1$-dimensional cokernel. Now the fact that $H^1(\mathbb P^4,\mathscr O_{\mathbb P^4})=0$ implies that then $h^1(\mathbb P^4,\mathscr I_0)=1$ as claimed by Hartshorne.

Furthermore, by flatness the Euler characteristic of $\mathscr O_{\mathscr X_0}$ is $1$, it has dimension  $1$, so it follows that also 
$h^1(\mathscr X_0,\mathscr O_{\mathscr X_0})=1$. Again, the fact that $H^2(\mathbb P^4,\mathscr O_{\mathbb P^4})=0$ implies that then $h^2(\mathbb P^4,\mathscr I_0)=1$.

This gives us a simple way, in fact two simple ways, to correct the statement.

 1. Change $h^0, h^1$ to $h^1, h^2$. The spirit of the problem remains the same.
 2. Change $\mathscr I$ to $\mathscr O_{\mathscr X}$ (where $\mathscr X$ is the subscheme defined by $\mathscr I$). Via this correction we get the jump for $h^0, h^1$, but for the cokernel of the ideal sheaf and the numbers are not exactly right, but still the point of the example is there.

I personally like choice #1 just because its proof requires one extra step. I make a wild guess that this may have been where the typo has come from: Hartshorne may have made the computation for $\mathscr O_{\mathscr X}$ and then decided to add an additional twist by "moving" the jump to the ideal sheaf, but forgot to correct the cohomology.