右边通分=[A(x-3)+B(x+3)]/(x+3)(x-3)
=[(A+B)x+(3B-3A)]/(x²-9)
=6x/(x²-9)
所以(A+B)x+(3B-3A)=6x
所以A+B=6
3B-3A=0,即B-A=0
所以A=3,B=3