I'm a bit confused by the question, where does paracetamol come into the question? Are you saying that paracetamol can be analysed with this method, but aspirin can't? Also, is the book saying that somehow the conditions (dissolved in methanol with NaOH and the presence of caffeine) makes it impossible to analyse aspirin via UV-Vis, whereas with paracetamol you can? And what exactly are you looking to analyse with the UV-Vis spectrum?
But anyhows, the first thing that would pop into my head too is that aspirin is more acidic than paracetamol, and NaOH isn't as basic in methanol as water, so its possible paracetamol isn't acidic enough to be turned into a salt in those conditions whereas aspirin is. I still don't know whats being analysed with the UV-Vis spectrum though. Have you checked out if methanol is a polar enough solvent to enable NaOH hydrolysis of paracetamol? That could narrow it down.