Save rotation relative to anchor


I need some ideas how to save the rotation of an object relative to another object/anchor.
I try to achieve the same functionality as how a child rotates with the parent object without the need to set the parent/child-relation. In a parent/child relation, the function i try achieve would be as simple as saving the rotation of the child.

For the location i use the transform.TransformPoint and save the x,y,z values for the created vector.

Vector3 posSaved = ParentItem.transform.InverseTransformPoint(ChildItem.transform.position);  


ChildItem.transform.position = ParentItem.transform.TransformPoint(posSaved);  

Any idea how this could be achieved would help me a lot.
Thank you!

I found a solution right after i posted, i have without joking tried different approachs for 10 hours.
For some reason i had determined in my mind that just adding/subtracting the angles do not work.
As far as i can see, i have achived the parent/child rotation behavior by subtracting the “parents” x y z Eueler angles from the “child” and then save the vector. And when loading the child again i simply just add the saved vector to the “parent” EulerAngles to place the “child”.