You began by supposing that
$$
\frac{9}{9-x^2}=\frac{a}{3-x}+\frac{b}{3+x}. \tag1
$$
Now you need to find values of $a$ and $b$ that make this true for all $x$ such that $x \neq 3$ and $x \neq -3.$
Next you discover that for every $x$ you care about
(every possible value of $x$ except $3$ and $-3$),
Equation $(1)$ is equivalent to
$$
9= a(3+x) + b(3-x). \tag2
$$
If you can find values of $a$ and $b$ that make Equation $(2)$ true for all $x$ such that $x \neq 3$ and $x \neq -3,$ then you have solved for $a$ and $b$ in Equation $(1)$.
But suppose you can find $a$ and $b$ that Equation $(2)$ true, not just for all $x$ such that $x \neq 3$ and $x \neq -3,$ but for every possible value of $x$
including the possible values $x = 3$ and $x = -3.$
Does the fact that the equation happens to be true for $x=3$ and for $x = -3,$
rather than undefined, give us any a priori reason to doubt that it is true for other values of $x$?
Plugging in $x = 3$ and $x = -3,$ and solving for $a$ and $b$ in each case does not actually (by itself) prove anything about the other values of $x.$
But it does tell us values of $a$ and $b$ that make Equation $(2)$ true for those values of $x$: $a = b = \frac32.$
Now look what happens if you plug these values into the right-hand side of Equation $(2)$:
\begin{align}
a(3+x) + b(3-x) &= \frac32(3+x) + \frac32(3-x) \\
&= \frac32(3) + \frac32 x + \frac32(3) - \frac32 x \\
&= 9
\end{align}
for every possible real number $x,$ including all the possible values that are not $3$ or $-3.$
That's how it works. We really did not care what values of $a$ and $b$ make
$9= a(3+x) + b(3-x)$ when $x = 3$ or when $x = -3.$
Setting $x$ to those values is just a technique for finding out what we need
$a$ and $b$ to be in order to make $9= a(3+x) + b(3-x)$
for all the other possible values of $x.$
And once we have that, we know that
$\frac{9}{9-x^2}=\frac{a}{3-x}+\frac{b}{3+x}$
also will be true for all those values of $x.$