The distance between two points in cartesian coordinates is given by the following expression:
The problem is simplified when one of the coordinates, y or x, are equal between the two points. When that happens the distance between them is the difference between the othe other coordinate. Therefore,
The distance between the points is 7 units.