Of course, you knew that. You might also suspect things could turn to your benefit, but believe such a payoff is unlikely. If you're looking for an excuse to help, to see if such a possibility exists, then let me provide you with a scenario. True story, involving me, where I fit the description of the other person in your story.
I went to a class. This was after I had been away from college for years, and this was the last quarter I could graduate under the old catalog, and was the last time this class was offered. I attended class and paid attention during the class. Yet I made an error that could well have been fatal to my efforts: I didn't take notes. I was naturally gifted with a talent of picking up an understanding of material quickly, doing well on tests, and memorizing some details rather well.
However, this humanities class ended up having a take-home exam which was a tremendous portion of the grade, and it asked for tons of nitpicky historical facts like dates and cities and other minor details. There was no way I would have passed this on my own.
Yet I had a savior... partners were allowed in this monstrosity of an exam, and here was an elder gentleman who was a fellow student and who was impressed with how attentive I seemed in class. He decided to partner with me.
I worked with him at the school and in his house, and it took us 3 or 4 days to fill out all the numerous questions that were asked. It became very evident that the only way either of us could pass was based on the notes he took. He quite literally saved me. But this was not unethical cheating - the rules totally permitted such "partnership". Surely, it was lopsided. I really only managed to contribute to one question the whole time. (There happened to be one question, out of the whole bunch, where my sharp memory did recall an obscure detail.)
So, he improved my score dramatically. What did I contribute back to him? Just one detail, which he somehow missed in his notes. The end result is that I graduated college. For him, the end result was his score was improved, by one correct question (out of probably hundreds).
I can also remember being in the shoes of being the knowledgeable one, when I was assigned a partner whose knowledge and skill were clearly inferior throughout the whole class. We were supposed to make a computer image, yet I decided we could go above and beyond by making an animation. It was wonderful, except for one part which was broken. I wasn't finding the cause as a deadline was closing in on us, yet my partner stunned me by successfully noticing a problem. He saved both of us.
So, getting back to you... would it be worthwhile to help, even if the overall result ends up being only a very slight benefit to your grade? (Not to say that those results are guaranteed... he might surprise you, and help a lot, or just not help at all.) Whether you deem such a slight bump to be worth your effort is a judgement call that would reflect how much you value your grade.
Also, there's the concept of you helping someone else. Maybe you doing such a good deed would just be a positive thing, simply for humanitarian reasons. Is that something you would like to invest in? Maybe the only benefit to you will be when someone else learned how nice you were. Maybe nobody will ever learn of that, but you yourself will know that you helped someone. Is this worthwhile?
If you were looking to see if excuses may exist on why to keep helping someone, I've just provided you with some. Ultimately, though, I agree with Anonymous Physicist's comment. There isn't a single answer which logic dictates to certainly be right. In the end, it's your judgement call.