Should the horizontal and vertical edges have the same separation?
Add construction lines connecting rectangle A's top right corner and rectangle B's top right corner, repeat for each corner, constrain the 4 lines to be equal in length.
Your own 3D parametric modeler.
FreeCAD is an open-source parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters.
Should the horizontal and vertical edges have the same separation?
Add construction lines connecting rectangle A's top right corner and rectangle B's top right corner, repeat for each corner, constrain the 4 lines to be equal in length.
I’d do either 45 degree lines of equal length on 2 corners with the same length, or 2 boxes with equal lengths.
It depends on what method would be easiest for you to implement and what your using to determine the distance between the rectangles.