to help
和
to solve
都是Sam所會willing(願意)去做的行動
所以都是to "action".
文法上有人可能會認為to help後便應該用solving the problem才對,solving the problem成為"名詞組"才是to help的整件事的意思,不過要考慮的是Sam的用意是否表示是他提供幫助help的主要意思是指solving the problem還是他同時表達幫助help是情感表達,加表示進行解決solve這亦是行動之一。
我認為從Sam主觀出發點講應該是to help you to solve the problem較為意思上合理些。
但是假如你是旁觀者記述Sam對Mary的回應,寫法則不同了,因為表達的角度不同了,你是表示Sam願意幫助Mary解決問問這行為,所以
Sam is willing to help Mary solving the problem.是一種表示客觀觀察的表述。
但一般英語人都會講述為
Sam is willing to help Mary to solve the problem.
I am willing
to help you(=Sam---->Mary)(prepositional phrase)
solve the problems=Participial used only adjectivally according to form
=solving the problems
=present participial qualifying "you"(=Mary)
This explanation gives an illustration of how words in Participial are used.