Answer:
p = 3, q = 1
Explanation:
well, let's think about what (x - p)² actually is.
let's do the multiplication (what a square is) :
(x - p)(x - p) = x² - px - px + p² = x² - 2px + p²
now, we compare the theoretical equation to the actual equation :
x² - 6x + 8 = 0
x² - 2px + p² = q
x² = x² check
-6x = -2px
-6 = -2p
p = -6/-2 = 3
that gives us
x² - 6x + 9 = q
compare this to
x² - 6x + 8 = 0
we subtract the second equation from the first
x² - 6x + 9 = q
- x² - 6x + 8 = 0
------------------------
0 0 1 = q
there you have it.