Let $x$ be the volume of E5 to be mixed, then the ethanol in the mixture is $$0.05x+0.1\cdot 5000$$ To obtain E9, this number should be equal to $0.09(x+5000)$. So you have to solve the equation $$0.05x+0.1\cdot 5000=0.09(x+5000)$$ that is $0.04x=0.01\cdot 5000$ and $x=1250$.