In the diagram below B is the midpoint of AC if AB equals 2X and BC equals X squared -24 find the value of X and the length of AC