If \( x = f(t) \) and \( y = g(t) \) are differentiable functions of \( t \), so that \( y \) is a function of \( x \) and \( \frac{dx}{dt} \neq 0 \), then prove that:
\[
\frac{dy}{dx} = \frac{\frac{dy}{dt}}{\frac{dx}{dt}}.
\]
Hence find \( \frac{dy}{dx} \), if \( x = at^2 \), \( y = 2at \).