Maintaining the relative position to another Object3D

I’m not sure if this post is the same question as mine:

First off, I don’t want to add the following 2 Object3Ds to the same parent container, except to the scene.

I have 2 Object3Ds. Object3D A is with an arbitrary position somewhere on its x, y, z and has an arbitrary rotation on its x, y, z axis.

We have Object3D B that is added to the same scene.

We take a “snapshot” of the position and rotation of Object3D B relative to the position and rotation of Object3D A. How would we take this relative position snapshot?

Now, if Object3D A starts to move around and rotate, I want to make Object3D B maintain it’s distance and relative rotation. Like as if we planted a lollipop (ie: Object3D B) on a basketball (Object3D A) and the basketball started to move around, the lollipop would move accordingly and maintain its distance and point of view to Object3D A and vice versa.