Sounds like a gifted kid to me!
If he understands the concept that 4/10 = 2/5, then he's found a very creative solution to the problem. Maybe he needs to explain it to his teacher, because he shouldn't be marked off IMHO.

My DD had something similar happen to her in math recently, and she proved to the teacher that she was right. Unfortunately for him, it was in front of the whole class blush