Two methods of finding out $\frac{d^2y}{dx^2}$ when $\frac{dy}{dt} = 4t-2$ and $\frac{dx}{dt} = 2t + 3$ Find $\frac{d^2y}{dx^2}$ given that $\frac{dy}{dt} = 4t-2$ and $\frac{dx}{dt} = 2t + 3$ at $t=2$
I tried two methods for this question, both of which give me different answers. Which one is wrong and why so?
Method $1$: $\frac{dy}{dt} = 4t-2$ hence $\frac{d^2y}{dt^2} = 4$, similarly $\frac{d^2x}{dt^2} = 2$ therefore, $\frac{d^2y}{dx^2} = 2$
Method $2$: $\frac{dy}{dx} = \frac{4t-2}{2t+3}$ therefore $\frac{d^2y}{dx^2} = \frac{(2t+3)4 - (4t-2)2}{(2t+3)^2}.\frac{dt}{dx} = \frac{16}{(2t+3)^2}.\frac{1}{2t+3} = \frac{16}{7^3}$
I can't understand why one method is wrong while the other is right, however they have very different answers. What am I doing wrong?

The formula $\frac{d^2y}{dx^2} = \frac{d^2y/dt^2}{d^2 x/dt^2}$ is wrong. A correct formula for $\frac{d^2y}{dx^2}$ in terms of the derivatives of $y$ and $x$ with respect of $t$ is the following:
$$\frac{d^2y}{dx^2}=\frac{dt}{dx}\frac{d}{dt}\left(\frac{dy/dt}{dx/dt}\right)=
\frac{d^2y/dt^2\cdot dx/dt-dy/dt\cdot d^2x/dt^2}{(dx/dt)^3}.$$
Therefore
$$\frac{d^2y}{dx^2}=\frac{4(2t+3)-(4t-2)2}{(2t+3)^3}=\frac{16}{(2t+3)^3}.$$
