Let's say there are $n$ days, for which $h_i$ is the number of hours worked and $r_i$ is the number of dollars per hour for that day for $i \in \Bbb{N}$. $h_i$ is the weight on each day because days with more hours affect the average rate of pay more. Therefore, to find the weighted sum, we simply need to sum up all of the $r_i$s with a weight of $h_i$, which can be expressed as:
$$\sum_{i=1}^n r_ih_i$$
Then, to find the weighted average, we need to divide this weighted sum by the total number of hours. The total number of hours is the sum of all $h_i$, or:
$$\sum_{i=1}^n h_i$$
Thus, we just need to divide the first part by the second part:
$$\frac{\sum_{i=1}^n r_ih_i}{\sum_{i=1}^n h_i}$$
Notice that this is exactly the same as total money divided by total hours. However, we are just looking at this process differently by looking at the $r_i$s as our objects and the $h_i$s as our weights.
Very large hint, without being a complete solution
Let $N$ denote the (unknown) number of students.
Let $S$ denote the (unknown) sum of their ages. Then the average age of the students is
$$
u = S/N.
$$
If we add Dan to the class, how many students, $N'$, will there be? And what will the sum, $S'$ of their ages be, in terms of $S$? And what does that make the average age $u'$ of this enlarged class in terms of $N$ and $S$? Once you know that, and set
$$
u' = u - 10,
$$
and then replace $u$ and $u'$ by the formulas for them, you get one equation in the two unknowns $N$ and $S$.
If we now add Michael to the class, we get yet another number, $N''$ of students, and yet another age-sum, $S''$. How are these related to $N'$ and $S'$ (or to $N$ and $S$)? We also get yet another average age, $u''$, and know know that
$$
u'' = u' - 8
$$
That gives us a second equation in the unknowns $N$ and $S$. Perhaps you can take it from here.
(Suggestion: Carry out the ideas I've described here and edit your question --- click on the word "edit" below the question to do so --- and show what you've gotten; perhaps we can then help your further if you still need it.)
Post-comment addition
You've got
\begin{align}
10 &= \frac{S}{N}-\frac{S+16}{N+1}\\
18 &=\frac{S}{N}-\frac{S+28}{N+2}
\end{align}
and that's great. It's typical, in situations like this, to clear the denominators, i.e., to multiply through by $N$ and $N+1$ or $N + 2$, resulting in
\begin{align}
10N(N+1) &= S(N+1)-(S+16)N\\
18N(N+2) &=S(N+2)-(S+28)N
\end{align}
When you expand out the right hand sides, a funny thing happens here: there are several $SN$ terms, and they all cancel. So you get
\begin{align}
10N(N+1) &= S-16N\\
18N(N+2) &= 2S-28N
\end{align}
From the first equation, we can solve for $S$; we can then plug this into the second equation to get an equation involving only $N$. That's good...we might be able to solve it. But it's a quadratic...that's potentially bad, because maybe there'll be two equally valid solutions. Or maybe they won't be equally valid. Why don't you go ahead and see where you end up when you follow that plan?
Best Answer
The average speed is total distance divided by total time. The percentages are distance. Let the total distance be $D$, though it will divide out. She went $0.1D$ at $56$ mph. How long did that take (it will include a factor $D$)? Do the same for the other two legs, add up the times, divide into $D$.