The line segment HI has length 3x - 5, and IJ has length x - 1.
We're told that HJ has length 7x - 27.
The segment HJ is made up by connecting the segments HI and IJ, so the length of HJ is equal to the sum of the lengths of HI and IJ.
This means we have
7x - 27 = (3x - 5) + (x - 1)
Solve for x :
7x - 27 = (3x + x) + (-5 - 1)
7x - 27 = 4x - 6
7x - 4x = 27 - 6
3x = 21
x = 21/3
x = 7