I am very interested in artificial intelligence and its relation with pure mathematics topics such as differential geometry, topology, algebraic topology, analysis, probability, etc. I am finishing my undergraduate degree in mathematics and I also have an engineering degree. I don't know whether to apply for a PhD in applied mathematics or computer science given my research interests (AI, Computer vision, ML). Any advice?
Find research papers that do the sort of work you hope to do in grad school. Then check the departments of both the PhD students and faculty members in these papers. These are the departments you should be applying to. At some universities, these may be CS departments, while at others these may be math departments. Equally importantly, perhaps more importantly, these faculty members are potential PhD supervisors. It's the advisor that matters more than the department, even though admissions criteria is determined on a per-department level.
This may only be valid in US. And, without knowing more about your background it is hard to give good advice. So, it is a bit tentative.
But first, note that pure math, which you have been studying, is very different from both applied math and CS. Different in the questions asked and the methodology for answering them.
I think that an applied math program is probably the least valuable if you want to study AI, which is normally a CS field. And you need to learn about methodology in CS. And, unless you are very careful in selecting an applied math department, you might find it hard to find people who know much about CS and, especially, AI. They exist, I'm sure, but you need a good search.
I'd guess, with the little information given, that the best bet is a program in CS at a place with a strong focus on AI. If you can bring other ideas, concepts, and tools to the study of that you will do ok. Your main techniques and processes and would be those of CS, but knowing math would be a plus. The other way round, studying math and trying to apply it to a specialized field like AI seems much harder.
But, one reason for suggesting that this may only apply in US is that comprehensive exams tend to be very important here and you need to pass those before the dissertation work gets totally serious. Advisors want to know that you have a clear shot to the end and that only happens when exams are behind you. If you are at a place where such exams are required then passing them will assure you have the background for serious research in that field.
There may still be some departments in which both CS and math are taught and if you can find one then there may be people there who have a lot of experience in both fields. I think that is disappearing, but would have been viable a couple of decades ago.