The key is to prove $Z(f,g) = Z(f)\cap Z(g).$ The result then follows by applying this result inductively.
If $x\in Z(f,g)$ then $f(x)=0$ and $g(x)=0$ so $x\in Z(f)$ and $x\in Z(g)$ so $x\in Z(f)\cap Z(g).$ The reverse direction has similar ideas.
Just a comment: I would not recommend studying (especially self study) algebraic geometry for the first time from Hartshorne. Chapter 1 of Hartshorne is really a quick crash course that quickly goes through the material of an entire book. He mentions this in the preface and really intends the reader has seen this material before elsewhere, but he provides it for revision. I would recommend going through Fulton's "Algebraic Curves" (freely available online) or Reid's "Undergraduate Algebraic Geometry" before you read Hartshorne.