Improving the detection accuracy of SO2 and SOF2, which are SF6 decomposition components in gas-insulated switchgear (GIS), is crucial for evaluating the insulation status of GIS. In this article, a method for the simultaneous detection of SO2 and SOF2 gases using a single laser is proposed, which significantly reduces costs. First, a mid-infrared photoacoustic spectroscopy (PAS) gas detection experimental platform is built, and the infrared spectrum of typical SF6 decomposition components is analyzed. The mid-infrared spectral bands for SO2 and SOF2 detection are identified, and a 1354-cm(-1) mid-infrared quantum cascade laser is selected. For a single gas, the detection system demonstrates a good linear relationship between the excitation photoacoustic (PA) signal and the concentration of SO2 and SOF2 in the range of 1-20 ppm. The detection limits for SO2 and SOF2 reach 0.876 and 0.884 ppm, respectively. For the gas mixture of SO2 and SOF2, experimental analysis reveals that interference occurs in the detection. Under the interference of fixed concentrations of SO2 (1, 10, and 20 ppm), the relationship between SOF2 concentration fitting remains strong, with linear fitting coefficients all exceeding 0.99. Similarly, under the interference of fixed concentrations of SOF2 (1, 10, and 20 ppm), the relationship between SO2 concentration fitting maintains good linearity, with coefficients still above 0.99. To address the cross-interference phenomenon in SO2 and SOF2 detection, an improved whale optimization algorithm (IWOA) is proposed to optimize the BP neural network (IWOA-BP) to eliminate cross-interference. The prediction results are compared and analyzed with other mainstream neural network optimization algorithms. The analysis shows that IWOA-BP possesses a stronger global search capability and faster search speed, achieving high accuracy and a small mean absolute error in the gas prediction of SO2 and SOF2. The accuracy of gas prediction for SO2 and SOF2 reaches 96.5388% and 96.2332%, respectively. These experimental results provide a reference for on-site mixed gas detection using PAS.