If you want to solve an unreasonable and unfair delay in your immigration case using a federal lawsuit, winning with a Writ of Mandamus or the Administrative Procedure Act (APA) will have the same outcome: a decision on your immigration petition.
The way to win your case on either is quite similar. So, if both of these give you the same outcome, why use both? It’s because it doesn’t cost more or hurt to use both, and some courts say that you can’t rely on Mandamus if there are other legal remedies available, and the APA may be such a remedy. It’s better to use both to avoid that risk.