I think if I’m not mistaken it should definitely be photosynthesis because if a forest lite up on fire it will cause more co2 to be produced not oxygen
So yeah I hope you understand my explanation and sorry if my answer turned out to be wrong but I tried my best