the question was this if $x^2 -8x + 7 = (x - a)^2 - b$ then the values of $a$ and $b$ are (Multi choice)
the answer was $a = 4, b = 9$ and I don't understand why
Here was my work process
I expanded so it was
$x^2 - 8x + 7 = x^2 - 2ax + a^2 - b \Rightarrow -8x + 7 = -2ax + a^2 - b$
And I didn't know what to do from there
You do not need to expand ,
$${\quad ~~ x^2 -8x + 7 = (x - a)^2 - b\\ \Rightarrow (x^2-2\cdot x \cdot 4 + 4^2-16)+7=(x - a)^2 - b\\ \Rightarrow (x-4)^2-9=(x - a)^2 - b \quad \cdots (1)}$$
$(1)$ is an Identity. Comparing both side,
$$\bbox[10px, border: 2px solid black]{a=4,b=9}$$
You can also compare from expanded form,
$$-8x + 7 = 2ax + a^2 - b \quad \cdots (2)$$
$(2)$ is an Identity. Comparing both side, $$-8=2a\Rightarrow a=4\\ a^2-b=7\Rightarrow 4^2-b=7\Rightarrow b=9\\\bbox[10px, border: 2px solid black]{\therefore a=4,b=9}$$