Let $z$ be the speed of Zoltan, assumed constant, and let $m$ be the speed of Mali. Then $$6(z-m)=18 \qquad\text{and}\qquad 2(z+m)=18.\tag{1}$$ The first equation holds because the _rate of gain_ by Zoltan is $z-m$, and in $2$ hours, Zoli gains $18$ km. The second equation holds because when they are travelling toward each other, the distance between them is decreasing at $z+m$ km per hour.
From the two equations in (1), we find that $z-m=3$ and $z+m=9$. Add. We get $2z=12$, so $z=6$. Now we can find $m$.