Given circles are
x2+y2=9 and x2+y2−8x−6y+n2=0,n∈Z
Now, the centre and radius of the circle are
C1=(0,0),r1=3C2=(4,3),r2=√25−n2
For the square root to be defined,
25−n2≥0⇒n2≤25⇒n∈[−5,5] ⋯(1)
As the given circles have exactly 2 common tangents, so
r1+r2>C1C2>|r1−r2|⇒3+√25−n2>√42+32>|3−√25−n2|
3+√25−n2>√42+32⇒√25−n2>2
Squaring on both sides, we get
25−n2>4⇒21>n2⇒n∈(−√21,√21) ⋯(2)
√42+32>|3−√25−n2|⇒|3−√25−n2|<5⇒−5<3−√25−n2<5⇒−8<−√25−n2<2⇒8>√25−n2>−2⇒8>√25−n2>0
Squaring on both sides, we get
64>25−n2>0⇒39>−n2>−25⇒−39<n2<25⇒0<n2<25⇒n∈(−5,5) ⋯(3)
From (1),(2) and (3), we get
n∈(−√21,√21)
As n∈Z, so
n=−4,−3,−2,−1,0,1,2,3,4
Hence, the number of values of n is 9.