There are things called congruence laws that deal with all of these results. Are you aware of these results?
if x is congruent to a mod n, and y is congruent to b mod n, then:
x+y is congruent to a+b mod n
xy is congruent to ab nod n.
therefore, mod 4:
if x ≡ 3 and y ≡ 2:
x+y ≡ 3+2 ≡ 5 ≡ 1 (mod 4)
x-y ≡ x+(-y) ≡ 3+(-2) ≡ 3+3 ≡ 6 ≡ 2 (mod 4)
xy ≡ (3)(2) ≡ 6 ≡ 1 (mod 4)
one doesn't need the "extra variables p and q" because ultimately we don't care what they are.
these facts about congruences are easy to prove:
x ≡ a (mod n) means: x - a = tn, for some integer t.
y ≡ b (mod n) meaus: x - a = un, for some integer u.
x + y = a + tn + b + un = (a + b) + (t + u)n
(x + y) - (a + b) = (t + u)n, and since t+u is an integer if t and u are:
x + y ≡ a + b (mod n).
xy = (a + tn)(b + un) = ab + (au + bt + tun)n, and au+bt+tun is also an integer (since all of a,b,t,u and n are) so:
xy - ab = (au + bt + tun)n and xy ≡ ab (mod n).
often, when one wants to distinguish between an INTEGER x and it's equivalence class modulo n, one writes: [x] instead of x. this lets us define two NEW operations on just the equivalence classes (often denoted by + and *, but these are "addition mod n" and "multiplication mod n" not the usual ones) by:
[x] + [y] = [x+y]
[x]*[y] = [xy]
in a standard abuse of notation, it is frequent to see "a (mod n)" used in place of [a] (or sometimes just "a" itself) but until one is used to it, it can be unsettling to see things like:
2 + 3 = 1 (mod 4), since this is certainly NOT true for the integers 2,3 and 1.