A perpendicular bisector cuts the segment into two equal pieces. We're told that T bisects AB, and UT is the perpendicular bisector.
So, AT = TB.
We're told that AT = 3x + 6 and TB = 42 - x. We set them equal to each other, find x, and report the length.
3x + 6 = 42 - x
4x + 6 = 42
4x = 36
x = 9
So AT's length is 3 * 9 + 6 = 27 + 6 = 33. TB's length is 33 too.