You say you are getting the door’s right vector and the frame’s forward vector but you are just getting the world transform for both.
Also, I am very confused with your question. If I understand correctly, you want to set the door’s location once (maybe at the start of the game) so that it is precisely aligned with the frame? It doesn’t sound like you are trying to calculate a rotation for the door, such as for opening and closing it.
If what I understand is correct, and you just want to align the two meshes, probably the best thing to do is when you/someone 3d models it, use the origin as the corner point for the frame and the door, with the door offset so that it will fit into the modelled doorframe. Then, you can set the location of both meshes the exact same, and just add relative rotation to the frame to open/close it.
Perhaps a reason why your door was set to a completely different position could be that its origin is not where you might expect a door’s hinges to be. A way to check is simply by selecting the door and using the Move tool. Look at where the gizmo was created; this is its origin.