We use the law of Cosines to find b=AC opposite B
[tex]b^2 = a^2 + c^2 - 2 a c \cos B[/tex]
We know all the sides of triangle ABM so we can use the law of Cosines, this time to solve for [tex]a c \cos B[/tex]
[tex]m^2 = (a/2)^2 + c^2 - a c \cos B[/tex]
[tex] ac \cos B = a^2/4 + c^2 - m^2[/tex]
[tex]b^2 = a^2 + c^2 - a^2/2 - 2 c^2 + 2m^2 = a^2/2 - c^2 + 2m^2[/tex]
Substituting,
[tex]b^2 = 8^2/2 - 5^2 + 2(4^2) = 32 - 25 + 32 = 39[/tex]
[tex]b=\sqrt{39}[/tex]
Answer: AC=√39