Very few people on this planet knows how to fix back pain problems, but I'm one of them. Around 15 years ago in my twenties I had back pain just after 2-3 hours of sitting on the chair, but I have learned what it takes to fix my posture and strengthen my spine muscles, and since then I dont have any back pain even after 12 hours of sitting. I have also straightened my spine and went from very bad forward head posture to perfectly straight posture.
Most people think sitting is not healthly but in reality human body is also perfectly build for sitting. The only problem is most people sit in the worst possible way and they think they need the most expensive chair with comfortable backrest support because otherwise their back with hurt. In reality it's the other way around, because your back will hurt only when your muscles will get weak and this is exactly what will happen if you will sit with backrest support for months and years (your chair will do the work instead of your muscles and that's not good in the long run). Also if you will sit with backrest support your spine vertebrae cant align correctly because your pelvis will be always rotated into posterior tilt. People sit years and years on twisted spine and then they wonder why they back hurts!
Human spine dont need any backrest support, but if your spine is already in bad condition and your muscles are weak then it will be IMPOSSIBLE to sit straight right away. Such person need to slowly build his muscles and it will take some time until spine will straighten.
How to straighten your spine? You have to learn how perfect posture looks like and when you will stop straining your spine, gravity will start fixing your spine for you without any additional exercises. The thing is sitting or walking with correct posture is the exercise and you do it everyday! People do all kinds of exercises in order to fix their spine, but 15 minutes of exercises per day cant cant counterbalance entire day of slounching!
But correct sitting posture is not everything. Many adults also have teeth in very bad condition and if you want to straighten your spine then you also need to fix your jaw (teeth). Teeth are extremely important to human body, but not only because they chew food, but also because skull is using jaw as a lifting mechanism. If your teeth are perfectly healthly, your jaw will be able to rise your skull above torso level without any problems (and you will have very long neck in the mirror). With damaged teeth skull will start droping forward (forward head posture) and then spine starts compressing and twisting (scoliosis).
Below picture shows two pictures taken the same day, before and after jaw correction (this young boy had all teeth, but he had to wear correction until his teeth has aligned correctly). When skull is aligned correctly, then the rest of the body will follow.
If someone want to fix their spine I can recommend these two books for a good start:
-Kathleen Porter, natural posture for pain free life
-Esther Gokhale, 8 steps to a pain free back.
But remember guys, these books will only teach you how perfect posture look like, but you also have to fix your teeth. Teeth are extremely important and without this step it will be much harder (if not impossible) to fully fix your spine. Good luck.