We have to calculate the measure of the segment AB.
We know that M is the midpoint, so AM = MB:
[tex]\begin{gathered} AM=MB \\ 15x-22=6x+5 \\ 15x-6x=5+22 \\ 9x=27 \\ x=\frac{27}{9} \\ x=3 \end{gathered}[/tex]Then, as AB=2*AM, we can calculate it as:
[tex]AB=2\cdot AM=2(15\cdot3-22)=2\cdot(45-22)=2\cdot23=46[/tex]The segment AB length is 46 units.