解:设这个人的平均速度为$x \, \mathrm{m/s},$火车的平均速度为$y \, \mathrm{m/s}。$
根据题意,得$\begin{cases} 18(y - x) = 300 \\ 15(x + y) = 300 \end{cases}$
整理得$\begin{cases} y - x = \frac{50}{3} & \textcircled{1} \\ x + y = 20 & \textcircled{2} \end{cases}$
$\textcircled{1} + \textcircled{2}$得:$2y = \frac{110}{3},$解得$y = \frac{55}{3}$
将$y = \frac{55}{3}$代入②,得$x + \frac{55}{3} = 20,$解得$x = \frac{5}{3}$
答:这个人的平均速度为$\frac{5}{3} \, \mathrm{m/s},$火车的平均速度为$\frac{55}{3} \, \mathrm{m/s}。$