Change of interest right before qualifying exam I'm a first-year pure math PhD student. I'm going to take an oral qualifying exam in a few months, and for this I need to find at least one person who agrees to be my adviser and one of the examiners in the qual. I'm interested in symplectic topology, and I have already talked with a professor of this area, whom I was going to ask for being my adviser. However, my interest in machine learning got revived, and I'm now very certain that I want to change my path. 

Reapplying to CS PhD isn't really a good choice for me, since I didn't take any CS course in undergrad. However, I have studied this area by myself, and the process was very easy compared with studying pure math. I've audited topics courses in ML, from which I believe I don't have any lack of prerequisite for this subject, and that I'm ready for research once I finish reading relevant papers.        

I'm aware that, once passing qual, I have freedom of changing the area to pursue. For example, a pure math PhD student having done a qual on symplectic topology can get a PhD by writing a thesis on computational complexity. While qual is not difficult for me, I have no idea how to actually proceed from now on. Should I tell the professor that I want to take the qual with him as my adviser and that I will not work on symplectic topology after that? (After that, I will find a co-adviser from CS department with whom I will work on thesis.) Or should I not tell him my intention until after the qual?
Given that you're in the US, my advice to you is slow down.  You don't need to pass your oral exams in your first year, and studying for and passing an exam in a subject that you intend to drop completely is not a good use of your (or anyone's) time.  Moreover, you can stop working with (or not start working with) your advisor without jeopardizing your future in the program, so there is absolutely no reason not to be forthcoming about your concerns.

I suggest talking to your current faculty advisor and devising a program of study which allows you to explore ML while not quitting symplectic topology "cold turkey".  As a first year student you can afford to spend at least a year taking courses trying to figure out what you want to study and building up background in that area.  In fact, it is very unusual for a first year US math PhD student to know exactly what they want to study in the future: that kind of decision usually lies at least a year away.  

It sounds like you thought you did and that you have some pride in your own advanced standing.  That's understandable, but the thought of going ahead with an examination in a subject that you plan to drop soon thereafter and with an advisor that you plan to drop immediately thereafter is really not a rational, wise or kind way to proceed.  I think you need to take some time to gain a better perspective.  Sharing your proclivities and your plans with your peers and mentors is a good way to do so, but again: take it slow.