Cut tofu, eggs, onion, and carrot into bite-sized pieces.
Heat cooking oil in a pan and sauté the onion and carrot.
Add the tofu and gently crumble it while stir-frying.
Beat the eggs and pour them into the pan, stirring together with the other ingredients until cooked.
Season with soy sauce, salt, and pepper to taste.
Place the finished tofu and egg stir-fry over rice.