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$ (i.e., the arithmetic genus is $0$), 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$.

The corresponding calculation for $t\neq 0$ gives $h^1(\mathscr X_t,\mathscr O_{\mathscr X_t})=0$ and so the fact that $H^2(\mathbb P^4,\mathscr O_{\mathbb P^4})=0$ in this case
implies that then $h^2(\mathbb P^4,\mathscr I_t)=0$.


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 would even 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.


**Addendum**
Here is an argument to prove that $x_2$ is indeed a global regular function on $\mathscr X_0$: 

Using *choa*'s description of the ideal we have that 
$$
\mathscr I_0=\mathscr J + (x_0x_2,x_1x_2,x_2^2,x_3x_2,x_4x_2).
$$
where $\mathscr J$ is the ideal sheaf of a rational normal quartic curve in $\mathbb P^3_{x_0,x_1,x_3,x_4}$. 

Consider the affine charts $U_i=(x_i\neq 0)\subset \mathbb P^3$ for $i=0,1,3,4$. Observe that $U_i\simeq \mathbb A^3$ with coordinates $y_j=\dfrac{x_j}{x_i}$ ($j\neq i$). In these coordinates $\mathscr J$ becomes very simple. For simplifying the notation I will work on $U_0$, but the other charts work the exact same way. So, $\mathscr J|_{U_0}=(y_3-y_1^3, y_4-y_1^4)$ and hence the affine coordinate ring of $\mathscr X_0\cap U_0$ is isomorphic to 
$k[y_1,x_2]/(y_1x_2,x_2^2)$. In particular, $x_2\in \Gamma(U_0,\mathscr O_{\mathscr X_0})$. 
Similarly, the affine coordinate ring of $\mathscr X_0\cap U_1$ is isomorphic to 
$k[y_0, y_0^{-1},x_2]/(y_0x_2,x_2^2)$ and so $x_2\in \Gamma(U_1,\mathscr O_{\mathscr X_0})$, the affine coordinate ring of $\mathscr X_0\cap U_3$ is isomorphic to 
$k[y_4, y_4^{-1},x_2]/(y_4x_2,x_2^2)$ and so $x_2\in \Gamma(U_3,\mathscr O_{\mathscr X_0})$
and the affine coordinate ring of $\mathscr X_0\cap U_4$ is isomorphic to 
$k[y_3,x_2]/(y_3x_2,x_2^2)$ and so $x_2\in \Gamma(U_4,\mathscr O_{\mathscr X_0})$.      
Therefore $x_2$ is regular on each affine chart of a covering and hence it is a global section. 

Note that the arithmetic genus of $\mathscr X_0$ is still $0$ since $\chi(\mathscr O_{\mathscr X_0})=h^0-h^1=2-1=1$.