Here's how I would write them:
A two-hour, fifty-one-minute, forty-second finish time
a five-year, three-month, nine-day project
Joe's finishing time was two hours, fifty-one minutes, forty seconds.
All OK with me, but I would also consider them correct with no commas at all.
The project lasted exactly five years, nine months, and three days.
Fowler and every style manual I have ever seen recommend omitting that final comma.
Student or Learner