First look at the bicarbonate. Increased bicarbonate raises the pH. Low bicarbonate lowers the pH. If you see a pH above 7.4 and the bicarbonate is elevated above normal, it means bicarbonate is guilty of raising the pH. So a metabolic alkalosis exists. If the bicarbonate is above 7.4 and the bicarbonate is decreased or normal, bicarbonate is not guilty. Similarly, if the pH is below 7.4 and the bicarbonate is below normal, it means lack of bicarbonate is responsible for lowering the pH. Therefore a metabolic acidosis exists. Look at the CO2.
Carbon dioxide is acidic.
A high CO2 will lower the pH, while a low CO2 will raise it. If the pH is above 7.4 and the PaCO2 is lower than normal, lack of CO2 is responsible. A respiratory alkalosis exists. If, however, the CO2 is normal or elevated while the pH is above 7.4, then CO2 can't be contributing to the disturbance. If both PaCO2 and HCO3- are shifted in a direction that would contribute to the pH abnormality, both are guilty.