There are several ways of doing this. Here are a few:
1: Xpresso driving offset
- Create an Xpresso tag, drag A onto the canvas, click on the red corner of the node and pick the position port from the menu
- Drag B onto the canvas and add a position input (blue corner)
- Create a constant node, set it to vector and set the offset according to your needs
- Create a math node set it to vector and make sure the function is set to "add"
- Wire the position of A into the first input of the math node
- Wire the output of the constant node into the second input of the math node
- Wire the output of the math node into the position input of B
- Now B should inherit the position animation of A but with the offset set in the constant node
2. Null driving offset
- Create an Xpresso tag, drag A onto the canvas, click on the red corner of the node and pick the position port from the menu
- Drag B onto the canvas and add a position input (blue corner)
- Wire the position output of A into the position input of B
- Create a null object and make object be child of it
- Move the null to where you want the animation to happen
- Now B should inherit the position animation of A but relative to the position of the null
3. Constraints (no Xpresso)
- Create a PSR constraint tag
- Go to the PSR tab and drag A into the target slot
- Unfold "Offset" and change the XYZ offset
- Now B should inherit the position animation of A but with the offset defined in the constraint tag
And in case you don't know, you can easily create the basic setup from the context menu. Right-click the parameter you want on the source object (A) and pick "Xpressions -> Set Driver" from the context menu. Do the same on the parameter of your target object but this time pick "Set Driven". An Xpresso tag will be created automatically with the node and ports you need.
I suggest to watch a few Xpresso beginner tutorials. Xpresso is old but opens up a lot of possibilities if you are willing to learn it. This is really the most trivial thing it can do.