That's right. As numbers, and are equal iff . To compare these expressions as functions, we must equip each of them with a domain. As long as those domains do not include -3, they are equal as functions (in the set-theoretic sense). With their natural, i.e., maximal, domains, they are different as functions because their domains are different.

In the process of transformations (e.g., when solving an equation), it is important to check if each equality is a true identity, i.e., holds for all values of variables. Similarly, it is important to check if two equalities or inequalities are truly equivalent, i.e., are both true or both false for all values of variables.