the midsegment of the triangle is shown. find the value of x

write the equation to solve for x:

x + 3
3x -1

please show work.
midsegment triangle theorem

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

x + 3 + 3x - 1 = 8
4x + 2 = 8
4x = 6
x = 6/4
x = 1.5