Hello Ivica,
The images are produced by Moodle text filters that are enabled on the page rather that the by the editor directly. It appears that both the TeX notation filter and the MathJax filter are enabled on the page you are seeing. The first image is produced by the TeX filter on the server. The TeX filter is normally much faster than MathJaX, but does not match as closely to the surrounding text as well as MathJax. The next two images that appear are produced by MathJax in your browser. The second is and rough preview that MathJax does quickly. It then takes another pass and displays the final image when it is finished. These results may depend in your case whether the mhchem package or extension is enabled and whether there is fonts are available.
You can control which images are produced depending on what you want to happen. If you are happy with the first image, you can disable the MathJax filter on the page and the TeX filter image will remain. You can also control how MathJax is displayed by right clicking the final image and choosing changing the renderer option. It looks like MathJax is missing the mhchem extension. To fix that you would need to change the MathJax filter configuration.
Daniel