Algebraic independence in $ k[x,y]$ Let $k$ be a field, then $x$ and $y$ are algebraically independent in polynomial ring $k[x,y]$, so I would guess that 2 is the maximal number of algebraically independent elements in $k[x,y]$ 
But I find if it's true, then if $f(x), g(x)\in k[x,y]$ are polynomials in $x$ solely, then there must be a non-zero polynomial $h(x,y)\in k[x,y]$ so that $h(f,g)=0$, because otherwise $\{f,g,y\}$ would be a set of three algebraic independent elements. But I don't see how to find this $h(x,y)$ for any given $f(x),g(x)$.
Anybody can tell me how to find $h$? 
 A: You are asking about a venerable subject in mathematics: elimination theory and resultants.
The problem is: given a parametric curve $t\mapsto (x=f(t), y=g(t))$ in the plane,  find a cartesian equation $h(x,y)=0$ for its image.
In other words find a polynomial satisfying $h(f(t),g(t))\equiv 0$ .
For example the parametric curve  $x=t^2, y=t^3$ (known as a cusp or as Neil's parabola) has Cartesian equation $h(x,y)=y^2-x^3=0$   
The problem (and its generalization to more variables) has been rejuvenated (and is an active field of research) by the stimulus of applied mathematics and the introduction of the technique of Gröbner bases.
A great introduction is this elementary book by Cox, Little and O'Shea where your problem is addressed in Chapter 3,  devoted to elimination theory, and more particularly in §3 ( devoted to implicitization) which solves your problem.    
That book is, by the way, an excellent introduction to algebraic geometry emphasizing applications  and computations.
It will appeal to beginners put off by the tendency of  modern algebraic geometry to escalate toward always higher abstractions. 
