Why the camera takes photos in yellow or green tones?

A few days ago when I want to take a photo with my cousin's 3DS but the photo looks with a green tone, I cover the left lens and the colors were good and when I cover the right lens is with the green color, but I turns off and power on the 3DS and the problem is solved.

Today I want to take a photo and it happens the same thing but now with yellow tones so I turn off and power on and the problem is again solved... for now.

What's happening with the lens?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0