Translating points from global space to local space?

Hello there. For some reason I cannot for the life of me get a very basic space transformation to work properly. I have a pair of functions that translates points from world space into the node's local space, in order to preserve rotations and the likes. I'm able to translate local to global perfectly fine. However, the opposite operation, making global positions into node-local ones, is eluding me:

https://preview.redd.it/eny4az83yg3e1.png?width=1039&format=png&auto=webp&s=f9a366687f281625969d75418a844b43c95ae302

How do I best do this? I'm on Godot 4, using C#. The documentation is saying cryptic things about vector multiplication and referencing methods that I can't access.