How come えをかきます is also correct? Because 絵=え? It's sometimes hard to know when it's not in kanji
the drawing (え、絵）is the object where drawing is directly being acted upon
'描（か）く' or other pronunciation '描（えが）く'. be used when drawing etc.
'書（か）く' be used when letters, sentences etc.
If you worry about it, please search '絵を描く' and '字を書く'. I think you will find the sentences '絵を together 描く' and '字を together 書く'.
Duolingo hasn't taught kanji for any of the words in this sentence, which is proabably why it's all in hiragana. If you're referring to why you cant use "to write" 書き to replace かき here, it's becuase another verb is being used that has the same exact sound but means "to draw" (描き). In a language with a limited range of sounds, it's common to have a lot of homophones.
Japanese children study ’hiragana' at first.
If you know correct spell of hiragana, you can search kanji from dictionary by using the spell.
え を かきます / え を えがきます E o(wo) kakimasu / e o(wo) egakimasu
Picture [object] draw [polite]
絵 (え) is a picture, and を is pronounced as お when it is the object marker particle, just like は is わ and へ is え.