How to negate if and only if How can I get $(A ↔ ¬B)$ or $(¬A ↔ B)$ from $¬(A ↔ B)$ using propositional laws?
I tried expanding $¬(A ↔ B)$ and I got to $(A ∧ ¬B) ∨ (B ∧ ¬A)$
I also tried expanding $(A ↔ ¬B)$ and I got to $(¬A ∨ ¬B) ∧ (B ∨ A)$
I don't know where in my expansion I went off the wrong path
 A: Your expansion of $\lnot(A\leftrightarrow B)$ into $(A\land\lnot B)\lor(B\land\lnot A)$ was correct.
Your expansion of $(A\leftrightarrow\lnot B)$ into $(\lnot A\lor\lnot B)\land(B\lor A)$ was also correct.
Well done. As @zkutch pointed out, the negation of $A\leftrightarrow B$ can also be though of as exclusive or (XOR), meaning one or the other but not both.

To address your comment, we first expand $\lnot(A\leftrightarrow B)$ into $\lnot((A\land B)\lor(\lnot A\land\lnot B))$. Then we use De Morgan's laws (which flip $\land$'s, $\lor$'s, and negate everything which isn't one) to get $\lnot(A\land B)\land\lnot(\lnot A\land\lnot B)$, which turns into $(\lnot A\lor \lnot B)\land(A\lor B)$.
We then distribute over the $\land$ to arrive at $(\lnot A\land A)\lor (\lnot A\land B)\lor(\lnot B\land A)\lor(\lnot B\land B)$, which simplifies to $(\lnot A\land B)\lor(\lnot B\land A)$.
Since $(\lnot A\land B)\lor(\lnot B\land A)$ reads as $A$ is true and not $B$, or $B$ is true and not $A$, it is equivalent to $A\leftrightarrow\lnot B$.
A: Distribute:
$$(A\land\lnot B)\lor(B\land\lnot A)=(A\lor B)\land(\lnot B\lor B)\land(A\lor\lnot A)\land(\lnot B\lor\lnot A)$$
and then recognize that $(P\lor\lnot P)$ is always true, so the middle two pairs drop out and the right hand side reduces to
$$(A\lor B)\land(\lnot B\lor\lnot A)$$
