What is the negation of the statement “either X is true, or Y is true, but not both”?
When $X$ and $Y$ are both true, the statement is false, so its negation must be true.
When $X$ and $Y$ are both false, the statement is false, so its negation must be true.
When exactly one of $X$ and $Y$ is true, the statement is true, so its negation must be false.
These observations lead us to the negation “either $X$ and $Y$ are both true, or $X$ and $Y$ are both false”. This can be stated more simply as $X=Y$ or $X\iff Y$.