Suppose the job is handing out flyers. If there are 100 flyers, and Martin hands out 2 a minute, it will take 100/2 minutes to hand out all of them. If Henry hands out 5 a minute, it will take 100/5 minutes to hand out all of them. And working together, it will take 100/(2+5) minutes to hand out all of them.
Now instead of 100 flyers, call it 1 task. You have
Martin starts 1 task, and part of the way through (the fraction p), he is joined by Henry, who helps him for the fraction 1-p of the task.
You also have
and you now have enough information to find 1/m and 1/h and solve the problem.