The sentence is a third conditional, which describes an unreal past situation and its unreal past result. The structure is 'If + past perfect, would have + past participle'. Therefore, the correct form of 'help' is 'would have helped'.
If he had asked me I would have helped him with his work.