It is known that (r+1)th term (Tr+1) in the binomial expansion of
(a+b)n is given by Tr+1=nCraa−rbr
Assuming that x5 occurs in the (r+1)th term of expansion (x+3)8 we obtain
Tr+1=8Cr(x)8−r(3)r
Comparing the indices of x in x5 and in Tr+1, we obtain r=3
Thus, the coefficient of x5 is
8C3(3)3=8!3!5!x33=8.7.6.5!3.2.5!.33=1512