If B is between A and C, AB=3x-1, BC=2x+4 and AC=38, what is the value of AB?

(3x-1) + (2x+4) = 38

Solve for x, then 3x-1.