BD = BO + OD ...(i)
AC = AO + OC ...(ii)
Since, diagonals are equal and bisect each other,
BD = AC
So, AC = BO + OD ...(iii)
Also, OD = OB ...(iv)
(Substitute (iv) in (iii))
AC = OB + OB = 2OB
So, 5x - 2 = 2 (x + 2)
⇒ 5x - 2 = 2x + 4
⇒ 5x - 2x = 4 + 2
⇒ 3x = 6
⇒ x = 2
AC = 5x - 2 = (5 × 2) - 2
= 10 - 2
= 8 units