\(a^3-b^3=\left(a-b\right)\left(a^2+ab+b^2\right)\\\)=9
<=>\(\left(a-b\right)\left(a^2-2ab+b^2+3ab\right)\)=9
<=>\(\left(a-b\right)\left[\left(a-b\right)^2+3ab\right]\)=9(1)
Thay a-b=3=>Thay vào (1) có 3(9-3ab)=9
=>27-9ab=9
27-9ab-9=0
=>18-9ab=0
<=>9ab=18
=> ab=2