This is a tricky problem because there is no good way to determine precisely the delay between the two signals. The time for the gas to flow from the pressure measuring point to the gas analyzer may vary with pressure, that is, the forcefulness of inpsiration or expiration. The speed of the analyzer is probably specified by the manufacturer. Some take a few seconds to produce an accurate reading.
If you know or can calibrate all those times, you can shift one set of data samples by that amount of time to align them. For example let the sampling rate be 10 Hz on each channel. If the analyzer signal is found to be delayed by 2.5 seconds, then the alignment would be 25 samples shifted (Delay Number of Samples = Sample Rate * Delay Time). If
both signals are in arrays A and B, then the aligned samples would be A[i] <=> B[i+25].
Lynn