Link one object's property to another object's different property
This is a classic case for using drivers.

Drivers are a bit tricky to master BEFORE you know what they're good for, but your case describes a very good example for their use.

Drivers allow you to use one property (or several) to drive another. There are several types of drivers, one of which is an expression where you can use arithmetic operators and mathematical functions. This is really useful when you want to create offset / inverted / factored relationship between the driving and driven properties (which seems to be what you are looking for. For instance advance 2 units in object1.location.y for each unit of object2.location.x).

It will be rather cumbersome to explain how to create and manipulate drivers here in text, but there are quite a few excellent video tutorials (such as this one) that will get you quickly acquainted with drivers.

Once you've grasped how to add and manipulate drivers via the UI, you can automate the process via python.