How do I move both the parent and child to a known position where I want the child to be?

I have two gameobjects. One is the child of the other. These two gameobjects should always retain their relative position to each other, that is to say, they should never move independently from each other.

I know where the child should be, and I’d like to move both the parent and child so that the child is where it should be.

How do I do this? See below for visuals:

An easy way would be to move the parent by an offset distance

public class Child : MonoBehaviour
{
	public MoveToTarget(Vector3 position)
	{
		Vector3 offset = position - transform.position;
		transform.parent.position = transform.parent.position + offset;
	}
}