Chosen Solution

This iPhone 4s had been asleep in my wife’s purse for a while . When I removed it to charge it I discovered that the back had separated from the body and the inner back was separated somewhat from the outer. After removing it I discovered the iFixit battery I’d installed some time back seemed to have “inflated” somewhat and was likely responsible for pushing the back away from the chassis. I have two questions: 1) what was the likely cause of all this and 2) can I repair it with a new back and battery? I’ve attached a photo which helpfully shows the problems. https://www.flickr.com/gp/rdmoran/6t3Tn7

Batteries can fail and swell up. Very common. Just replace it. If it is less than a year old iFixit will replace it for free. iPhone 4S Battery Replacement