For f(x) a function of x, we can denote the derivative in several ways.
On family of notations uses a "differential operator".
This is a notation that tells us "take the derivative".
For example Dx(5x2+3) means "The derivative, with respect to x, of the function f(x)=5x2+3. SO Dx(5x2+3)=10x.
ddx is another notation for "the derivative with respect to x of . . . #
So ddx(5x2+3) means the same thing as Dx(5x2+3).
To take the second derivative, we take the derivative twice:
Dx(Dx(5x2+3)) is written D2x(5x2+3)
ddx(ddx(5x2+3)) could, perhaps, be written (ddx)2(5x2+3), but the standard notation is d2dx2(5x2+3).
If we let y=5x2+3, then these examples look like:
First derivative: Dx(y) and ddx(y) which is also written dydx.
Second derivative: D2x(y) and d2dx2(y) which is also written d2ydx2.
In this notation, we do not think of dx as d times x
Instead, we are thinking of dx as a single quantity. That is why we do NOT write d2(dx)2(y)
Additional Note
I would interpret dy2dx as ddx(y2). Using the chain rule, I would evaluate to get ddx(y2)=2y⋅dydx.
Using y=5x2+3 again, we have ddx(5x2+3)2=2(5x2+3)⋅5=10(5x2+3)
Note 2
(dydx)2 means the square of the derivative of y.
Using y=5x2+3 again, we have
(dydx)2=(10x)2=100x2.
This kind of expression can come up if using implicit differentiation to find 2nd or higher derivatives. (If we don't pause to solve for dydx before our second differentiation.)