The distance of a portion of a line can be determined as the coordinates somewhere along the two endpoints given. However this question provides just the distance along a line and that is 8 units. The point I lies somewhere along the line and from point H to I the length is 2 units. That means the distance from I to J is the difference between distance HJ and distance HI, as illustrated below;
The measure of IJ is calculated as shown above
IJ = HJ - HI
IJ = 8 - 2
IJ = 6