Not a teacher
In you example:
"He has spent milions of dollors to support a/the lung cancer foundation."
You can't. I'ts an infinitive. But you could express it by:
"He has spent milions of dollors on supporting a/the lung cancer foundation.
Note the need for an article. Waiting for a more learned opinion,