On pg. 291 of the Players Handbook (Appendix A: Conditions) it states that:
A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging.
(emphasis mine).
A Bag of Holding is a magical item, so it is not transformed when a creature carrying it is petrified.
But what happens to nonmagical items carried inside the Bag of Holding?
Are they protected from transformation because they are inside the untransformed magical bag?
Or do they become petrified inside the bag - increasing their weight by a factor of ten, and potentially causing the bag to exceed 500 pounds, the bag to rupturing, and its contents being scattered in the Astral Plane (PHB pg. 153) - because they are nonmagical items being carried by the petrified creature?