Instead of the second derivative being "d^2y/dx^2" it is "(d^2y/dx^2) - (dy/dx)(d^2x/dx^2)" and the differentials can be manipulated just like any other entity. Additionally, you can infer this notation by simply applying the quotient rule to the first derivative (which is a quotient of infinitesimals).
See more:
"Extending the Algebraic Manipulability of Differentials" ( 10.48550/arXiv.1801.09553 )
"Total and Partial Differentials as Algebraically Manipulable Entities" ( 10.48550/arXiv.2210.07958 )