Calculate Local Rotation

Hey!
So, I’ve got two objects, and I want to find one object’s local transformation in relation to the other. I’ve got scale and translation down, but I still need to figure out how to convert rotation in 3D space. I’m also trying to fit another constraint: I can’t just use .attach()

What do you suggest?

I was able to bypass the constraint of not being able to use .attach(), and I also learned some stuff about matrices for future.

But if you have an answer to the question, I encourage you to leave it anyway for learning purposes!