Arithmetic Progression Time and Work Problem 
A group of men working at the same rate can finish a job in $45$ hours. However, the men report to work, one at a time, at equal intervals over a period of time. Once on the job, each man stays until the job is finished.
  If the first man works five times as many hours as the last man, find :
1) The number of hours the first man works.
  2) The total number of men in the group.

I know it is an AP problem but I can't figure out how to solve it. I also know I have to use the formula $n = (l-a)/d + 1$
where $l$ = last term, $a$ = first term, $d$ = common difference, $n$ = no. of terms

Suppose that there are $M$ men in the group.  We are told that it takes $45M$ man-hours to finish the job.  Now suppose the first man comes to work at time $0$ and works until time $T,$ and that the other men arrive at intervals of $h$ hours.  The second man arrives at time $h$ and works until time $T$ so he works $T-h$ hours.  The second man arrives at time $2h,$ so he works $T-2h$ hours and so on.
The total number of man-hours worked is $$
T + (T-h)+(T-2h)+\cdots+(T-(M-1)h))=M\left({2T-(M-1)h\over2}\right)=45M$$ so that $$2T-(M-1)h=90\tag{1}$$
The first man works $T$ hours, the last man works $T-(M-1)h$ hours and we are told that $$T=5(T-(M-1)h)$$ so that $$4T=5(M-1)h\tag{2}$$  Solving $(1)$ and $(2)$ simultaneously gives $$\begin{align}
(M-1)h&=60\\
T&=75\end{align}$$
We can say that the first man works $75$ hours (without any rest!) and the last man $15,$ but the number of men is not determined.  If $M=2,$ the first man works $75$ hours, the last man works $15$ and the whole job takes $$75+15=90=45M\text{ man-hours.}$$  If $M=3,$ then $h=30,$ the second man works $45$ hours, and the whole job takes $135$ man-hours.  Any integer $\ge2$ gives a valid value for $M.$
