I don't know why exactly children do things like this, but when my oldest daughter was two, and her younger sister had just been born, whenever I sat to feed the baby, the oldest, who had long ago been potty trained, would come into the room, pull down her pants and poo on the floor in front of me! I was horrified! Soon I realized she was imitating the baby in order to get that attention back to herself. I dealt with it by involving her in the feeding process. I truly believe your older son is just trying to gain back attention lost to the younger son. Try to have him involved in potty training the two year old. Tell him you need his help to do this and have him "show" the younger one "how to go potty". Be sure not to fuss at him about his "accidents", but to tell him calmly as you can, "I need you to help me teach your little brother, who is a baby, how to be a big boy like you. Can you show him how to go potty on the potty chair?" I betcha you will see a different result than what you're seeing now. And remember this: to a child, attention is attention, so even negative attention, in their eyes, is okay, just as long as it is attention. So don't give in to the urge to yell at him or punish him, try your best to ignore his misbehavior in that way, and involve him in doing the "big boy" things that will teach the younger one. Good luck.