On a test, a student wrote A B ~= C D instead of A B ~= C D. Is this answer correct? Why

since both your expressions are identical, I think there's a typo.

If you meant for the operators to be "equal" and "congruent", then the answer is that AB and CD are geometric figures. As such, they can be congruent, not equal. They are congruent if their lengths are equal.