I am given a variety $X = Z(f_1,f_2)$ in affine 3-space (in $x,y,z$), and I would like to compute its projective closure $Y = Z(g_1,\dots,g_n)$ in projective 3-space (in $x,y,z,w$). I have seen this done when $X$ only has one generator, $f_1$, by letting $$ g_1(x,y,z,w)=f_1(x/w,y/w,z/w), $$ and it seems partly applicable to this question, in that I get some (two of the four, in my specific case) generators of the closure, but not all of them. I have also seen this done in total generality, with Groebner bases, but I do not need such heavy machinery.
Is there a straightforward way to solve this small case of two generators? And how do I know how many generators the closure will have?
To homogenize an ideal, you must homogenize a Gröbner basis for $I$. For more on what can happen, see for example this MO answer.
However, in the case of two generators, it is usually very easy to find a Gröbner basis. For example, if it the initial terms (in some order) are prime, then then the two polynomials are already a Gröbner basis, so you can just homogenize them.
An example where this fails, is the twisted cubic, $f_1=x-z^2$ and $f_2=x-yz$. Here you need an additional generator, because the lead terms are the same. Computing, we see that $f_3=y-z^2$ does it. These constitute a Gröbner basis, and so the equations for the projective closure are jut given by homogenizing $f_1,f_2,f_3$, to give $g_1=xw-z^2$, $g_2=xw-yz$, and $g_3=yw-z^2$.
ADDED: Okay, lets look at your example with $f_1=x-z^3$ and $f_2=y-z^2$. Depending on the term order, this is already a Gröbner basis. If we use the lexicographic term order, then their initial terms, $x$ and $y$, respectively, are prime, so $f_1,f_2$ are already a Gröbner basis. However, if we use the degree lexicographic order, then we have to add another polynomial $f_3=yz-x$ to get a Gröbner basis. In either case, we can homogenize, so we get that the homogenization is generated by $g_1=xw-z^3$ and $g_2=yw-z^2$. However, this is not a Gröbner basis anymore. Feeding this into
Macaulay2, we see the following:Here I used the lexicographic order. So the number of generators doesn't increase, but the size of the Gröbner basis doubled.