iPhone 5 (iOS 10.3.3) getting pretty hot within brief usage of 5-10 minutes I've been using an iPhone 5 for about a year and have never faced this issue. Due to some reason which I am unaware of, whenever I use it in an air-conditioned room, it gets pretty hot from both back and front.

This happens even when I am just using the flashlight or the built-in Camera app.

I checked with a mobile workshop, but it was of no use. Got the battery replaced with a new one, but to no avail.

How do I overcome this heating issue?
While there could be a variety of reasons for an iPhone to warm up, the common ones include using it while it's charging, using a bad (cheap, 3rd party) charger, bad battery (can be ruled out as you mentioned you got the battery replaced), one or the other component failure due to ageing (iPhone 5 was released in 2012 and were last produced in 2013 before being discontinued), using a rouge app (a non-performant app which may cause device heat up on slower devices, usually happens with some 3rd party apps and certain resource intensive games) etc.

Luckily, you iPhone has a built-in heat sensor and if it gets warm beyond a point, it will show a warning sign and shut down automatically. So, while heat up could be a concern, there should be no real threat of serious damage (again, it is preferable to use Apple original charging equipment).

While there could be no concrete answer for the issue, I'd experiment with tweaking with various parameters mentioned above.