Question: why can gajeel use magic in edolas?
Answer: It's because Mystogan gave Lucy and Gajeel something called an X-Ball. ... He gave a vial of these X-Balls to Gajeel, who then gave them to Erza and Gray, who passed some on to Natsu and Wendy. So them using magic in Edolas, despite not being able to at the beginning of the arc is explicitly explained within the arc.