How to approach professor about potential paper? Earlier in my undergrad I co-authored a paper with one of my professors. Initially it was supposed to be just a class project, but on his suggestion I did some more work and went with it at a student conference and then with substantial help from his part we managed to further expand the topic and write an article which has been published on a (small) national journal.

A few months ago I took part in a problem solving contest for undergrads. Among the problems there was one which was quite interesting, basically made out of two parts. I got the highest score on the problem, but barely did any work on the second part. I tried looking in the literature and while there are many references about the general concept, nothing about the specific version presented on the contest (I should point out that there is nothing trivial about it, i.e. the solution and the implications are different from anything I found so far). This seems like a nice opportunity for a paper, and I think I could actually get it solved with some additional help. I was thinking about proposing this to the professor that was my co-author on my first paper, but I’m not really sure how to approach him, as the synopsis for the first one was totally different from this case. To make matters more complicated, we got some money out of the first paper (not much and it was his initiative to apply for the prize), and I also received a scientific performance scholarship for it, and I don’t want him to feel/think that I’m trying to do research for the sake of money.

So, how should I formulate my e-mail in order to make him understand that I see an opportunity for an article but without seeming like I’m desperate?
I think you're overthinking this.

I can't imagine any professor thinking you are desperate or just want money out of this. In fact, I would expect a professor to be excited to get an email from a student that has taken the initiative to start a project and reaches out to see if they are interested in collaborating.

You really have nothing to lose here. Professors are generally eager to publish. Send an email!