So first you want to find the price of all the magazines he bought which is 3.95 x 3 = 11.85. then you are going to find out how much money he had left to spend on books which is 47.65-11.85=35.80
then you want to find how many books he bought with that money so you would take 35.80/8.95= 4