You can give your blue cube a Transformation constraint with the red cube as Target:
Enable the Extrapolate option. In the XYZ fields, choose the values you want, it will determine the ratio. If you choose -10/10 and -10/-10, the blue cube will move as much as the red cube on the given axis. If you choose -10/10 and -20/-20, the blue cube will move twice the distance of the red cube: