Both acids exfoliate. The difference is where they work, and that decides which breakout each one is good for.
Salicylic acid: into the pore
Salicylic acid is a beta hydroxy acid (BHA). It is oil-soluble, so it can travel into oily pores and loosen the build-up that becomes blackheads and whiteheads. It also has a mild calming effect, which helps with small, inflamed spots.
Best for: blackheads, congested T-zones, oily skin, frequent small breakouts.
Mandelic acid: on the surface
Mandelic acid is an alpha hydroxy acid (AHA) with a larger molecule than glycolic acid. It moves into the skin slowly, which makes it gentler. It smooths rough texture and helps fade the marks breakouts leave behind.
Best for: sensitive or easily irritated skin, uneven texture, and post-acne marks on deeper skin tones.
Using both
Most acne-prone skin benefits from each, just not at full strength on the same night. A simple split works well: salicylic acid in the areas that clog, a few evenings a week, and mandelic acid on alternate evenings. Start low, add one product at a time, and wear sunscreen every morning.
If breakouts are deep, painful or leaving scars, see a dermatologist — over-the-counter acids are not enough on their own.