Do the three ways of measuring producer’s surplus give the same result? In the Firm supply chapter of the microeconomics Varian's book, they show "three equivalent ways to measure producer’s surplus" using marginal cost, average cost and the average variable cost curves.

But my teacher says, "those three ways give different results. You have to keep the same method during a given analysis".

So are they or not giving the same result?

Intuitively I think they do give the same result and do not understand why my teacher says they do not.
Ask your teacher what he meant, because there is either a misunderstanding or he is mistaken. 

Producer's surplus will come down to $y \cdot p - VC(y)$.

In the first graph, by definition of $AVC$ we have
$$
y \cdot (p - AVC(y)) = y \cdot p - VC(y).
$$
In the second graph, using $\int MC = VC$ and $VC(0) = 0$, we have
$$
\int_0^y p - MC(x) \text{d} x =
\left[x \cdot p - VC(x)\right]_0^y = y \cdot p - VC(y).
$$
The area in the third graph is 
$$
\begin{align*}
\int_0^z p - AVC(z) \text{d} x + 
\int_z^y p - MC(x) \text{d} x.
\end{align*}
$$
Let us calculate it by parts:
$$
\begin{align*}
\int_0^z p - AVC(z) \text{d} x &amp; = z \cdot p - z \cdot AVC(z) = z \cdot p -  VC(z) \\
 \\
\int_z^y p - MC(x) \text{d} x &amp; = (y - z) \cdot p - VC(y) + VC(z). 
\end{align*}
$$
Summing up the two, we get $y \cdot p - VC(y)$.