Could somebody explain this problem and solution(about partial derivatives)

Please firstly examine the question and solution. (5b)...
There it says f(x,y)=z and x=g(r,teta) and y=h(r,teta) and asks fxx.
He solves this problem by starting so;
fx=zr*rx+zteta*tetax ...
My question is that by writing fx such as above aren't you assume that r and teta are a function of x? However in the question it says x=f(r,teta); this means x is a function of r and teta then how can you write fx=zr*rx+zteta*tetax? Isn't there a contradiction or am i understanding something false?

You are told that [itex]x= r cos(\theta)[/itex] so obviously x is a function of r and [itex]\theta[/itex] and therefore r and [itex]\theta[/itex] are functions of x. (It does not however anywhere say x= f(r,[/itex]\theta[/itex]).) As long as a function is invertible, you can work either way: If x= f(r), and r is invertible, then r= f-1(x) and dr/dx= 1/(dx/dr).\

Here, you really have "polar coordinates": [itex]x= r cos(\theta)[/itex] and [itex]y= r sin(\theta)[/itex] so that [itex]r= \sqrt{x^2+ y^2}[/itex] and [itex]\theta= arctan(\frac{y}{x})[/itex]. You can do it either way.