First, A and ~B are not equal, since they are not the same formulas. A formula is a string of symbols and formulas are equal if and only if they are the same string of symbols. However, they might be logically EQUIVALENT.

So the question is whether A and ~B are logically equivalent. (Should I surmise that the connective in your A is a typo and is supposed to be the "if and only if" sign just as is the connective in B?)

Second, you did not properly negate B. Indeed, what you thought was negating B is just an equivalent (so very much not a negation) of B.

Third, you don't show equivalence by using a particular interpretation of the predicates, such as you interpreted P and Q. You can use particular interpretations to prove the invalidy of a formula (here the formula in question is A <-> ~B), but not of the validty of a formula, since validity depends on the formula being true with ANY interpretation of the predicates.

Those three points suggest to me that you need a very thorough review of the fundamentals of symbolic logic.