Why did Ponyboy say he had killed Bob and Johnny wasn't dead in The Outsiders?
Pony had lost weight during his stay at the church while on the run. He was burned in the fire and he was suffering from shock. Just before the rumble, he complained of a "terrific headache" and had been "running a fever"; then he was beaten and kicked in the head during the greasers' battle with the Socs. Afterward, Johnny awoke after sleeping for more than two days. Suffering from "Exhaustion, shock, minor concussion...," he is not thinking clearly and is forced to stay in bed for a week. He doesn't remember visiting Johnny in the hospital, and at first he denies that Johnny is dead. Later, he refuses to admit that Johnny had knifed Bob, instead claiming that he had killed Bob himself. Even at his court appearance, be believes Randy and the other Socs were lying about Johnny killing Bob. It is a simple case of living in denial, mixed with the concussion, an unnecessary guilty conscience, and his own refusal to admit that Johnny--now a dead hero--could be blamed for killing Bob. But he finally admitted to himself the truth.
I knew Johnny was dead. I had known it all the time, even while I was sick and pretending he wasn't... I had just thought that maybe if I played like Johnny wasn't dead it wouldn't hurt so much. (Chapter 12)
By trying to convince himself that Johnny was still alive and that he was the one who killed Bob, Ponyboy is trying to cope with all the tragic events that he had witnessed. It is important to acknowledge what he has gone through in order to understand his state of mind. Ponyboy’s parents die in an accident, and he is raised by his brother Darry. Life is bearable until he is attacked by Bob and Johnny rushes to his defense, killing Bob.
The two friends are forced to run away with the help of Dally. The church they stay in catches fire and children are trapped inside, forcing the boys, including Dally, to risk their lives trying to save the children. Johnny is seriously wounded and dies at the hospital due to the extent of the damage. Dally gets himself shot after the rumble and dies. Ponyboy is a witness to all these events, and it is understandable that the events are unbearable. He is to some extent blaming himself because Johnny is dead and it all started with him trying to defend his friend. Thus, he is trying to make his life bearable once again.