As given m is a midpoint of ab. So am is half of ab.
So we can write
[tex]am = \frac{ab}{2} [/tex]
As given am = 3x+3 , ab = 8x - 6.
So [tex]3x+3 = \frac{8x - 6}{2} [/tex]
[tex]3x+3 = \frac{2(4x - 3)}{2} [/tex]
[tex]3x+3 = 4x - 3[/tex]
[tex]3+3 = 4x - 3x
[/tex]
[tex]6 = x[/tex]
So x = 6.
So length of am = 3x+3 = 3*6 + 3 = 21