Distance does not have a direct impact on height in algebra. Distance is calculated based on the position of two objects, but the height of those two objects is not required to calculate the distance between them.
There are instances in which the height of an object, in relation to another object, can have an effect on the distance between them. For example, the distance of two items on the floor may be different than if one of the items were to be lifted significantly higher.
It should be noted that the height of the item itself does not affect the distance between the two items, but the relative height to the object in comparison to another.