They are both legendary. Where perhaps Anand was positionally a touch stronger, Kasparov was just stronger in attacking and had more creativity when it came to finding breakthrough moves.
Gary is my favorite with a firm third place behind Magnus and Fischer.
Kasparov started before , his peak was at a different time.
Anand played kasparov when Kasparov was at his peak. It is completely unfair to say Kasparov is better. We dont know what would've happened when anand was a 5 time world champion. By then kasparov was long retired. So no , you cannot say Kasparov was better.