Let $X$ (resp. $Y$) be the affine $k$-scheme defined by the ideal $I$ (resp. $J$) in the polynomial ring $k[x_1,...x_n]$ (resp. $k[y_1,...,y_m]$). Let $Z$ be the affine scheme defined by the ideal $L$ in $k[z_1,...z_s]$, and let $f^\*:k[z]/L\rightarrow k[x]/I$ (resp. $g^\*:k[z]/L\rightarrow k[y]/J$) be $k$-homomorphisms, where $x=(x_1,...,x_n)$ and so forth, corresponding to scheme morphisms $f:X\rightarrow Z$ (resp. $Y\rightarrow Z$).

Then it should be possible to express the fiber product $X\times_{f,Z,g}Y$ via an ideal $W$ in the polinomial ring $k[x,y,z]$ [edit: actually, $W$ should be an ideal in $k[x,y]$] (where $x$ stands for the string of variables $x_1,...,x_n$, and so on).

Question: how to express $W\subseteq k[x,y,z]$ explicitely in terms of $I$, $J$, $L$, $f^\*$ and $g^\*$?

Edit: You can express things explicitely in terms of some polynomials $F_i$, $G_i$ and $H_i$ such that $I=(F_1,...,F_N)$, $J=(G_1,...,G_M)$ and $L=(H_1,...,H_S)$, and in terms of the components $(f_1,...,f_s)$ (resp. $(g_1,...,g_s)$) of $f$ (resp. $g$).