The domain is the set of all real numbers.
Express "Every number other than 0 has a unique multiplicative inverse" as a logical expression.
My solution is: ∀x ∃y ∀z (((x ≠ 0) → ((xy = 1) ∧ ((z ≠ y) → (xz ≠ 1))))).
However, the given solution is: ∀x ∃y ∀z (((x ≠ 0) → (xy = 1)) ∧ ((z ≠ y) → (xz ≠ 1))).
Shouldn't we check if the number is unique((z ≠ y) → (xz ≠ 1)) only if x ≠ 0?
However, the given solution checks whether the number is unique regardless?
Your approach to the problem is the safer and more logical option; if you want to make a claim about every number other than $0$, your predicate should have the form $(x \ne 0) \to (\text{everything else})$.
However, the textbook's solution "gets away" with being sloppy, because the statement $$((x \ne 0) \to (xy=1)) \land ((z \ne y) \to (xz \ne 1))$$ is still true when $x=0$. (In that case, the second clause becomes "$(z \ne y) \to (0 \ne 1)$", which is true regardless of $y$ and $z$.)
Intuitively, checking the clause $(z \ne y) \to (xz \ne 1)$ unconditionally means that even if $x = 0$, we still claim that $x$ does not have multiple multiplicative inverses. This is a true statement, so the textbook's solution is fine (at least, fine for some purposes).
In a world where $0$ did have multiple multiplicative inverses, your solution would still be correct, but the textbook's solution would not be. So the two logical expressions are not purely logically equivalent; they are equivalent under some assumptions about how the real number $0$ works.