Answering this question requires assuming that all steps are "elementary", e.g. that $\ce{A + B -> C}$ is an irreversible bimolecular reaction that is first-order in $[\ce{A}]$ and first-order in $[\ce{B}]$. (Obviously we are also assuming that activities can approximated by concentrations.)
With that assumption, the fact that $\ce{C}$ conversion is "fast" means that we can replace the existence of $\ce{C}$ in the scheme entirely:
\begin{align}
\ce{A + B~(slow) &\rightarrow D + B} \\
\ce{D + E~(fast) &\rightarrow F}\\
\ce{F~(fast) &\rightarrow G}\\
\end{align}
Likewise if $\ce{F}$ conversion is "fast", then it can be replaced:
\begin{align}
\ce{A + B~(slow) &\rightarrow D + B} \\
\ce{D + E~(fast) &\rightarrow G}\\
\end{align}
Hopefully this makes it clear why $\ce{E}$ must appear in any rate law for formation of $\ce{G}$: there is no source of it in the two reactions we are left with.
For $\ce{D}$, I agree that the situation is a bit more complex. It might appear in the rate equation, or it might not. Necessary reactants at the beginning of the reaction if we are ever to see product $\ce{G}$ are $\ce{A}$, $\ce{B}$, and $\ce{E}$, so it would make sense to eliminate $\ce{D}$ from the rate law if possible. However, that could be algebraically difficult, or perhaps $\ce{D}$ is easier to measure, etc. There is no reason $\ce{D}$ can't appear in the rate law.
Huge caveat: "fast" and "slow" are relative terms and as such without further context they are ambiguous. The problem as constructed sounds a bit sloppy. For example, is the "fastness" of $\ce{F -> G}$ faster or less fast than the fastness of $\ce{D + E -> F}$? The problem doesn't say but the simplifications I did above actually depend on these sorts of details.