Idea. Both sides are polynomial in the entries of A (this is where n≥2 matters: the exponent n−2 is non-negative). So it suffices to check the identity on the dense set GLn(R).
Step 1: facts about adj. Recall AadjA=adjAA=(detA)I. So for invertible A, adjA=(detA)A−1. Also, since each entry of adjX is a minor of size n−1,
adj(cX)=cn−1adjX(c∈R).
Step 2: invertible A. Then adjA=(detA)A−1 is invertible with
det(adjA)=(detA)ndet(A−1)=(detA)n−1=0.
Apply the formula adjX=(detX)X−1 to X=adjA:
adj(adjA)=(detA)n−1((detA)A−1)−1=(detA)n−1⋅detAA=(detA)n−2A.
(Alternatively use homogeneity: adj((detA)A−1)=(detA)n−1adj(A−1) and adj(A−1)=det(A−1)A.)
Step 3: density. The map A↦adj(adjA)−(detA)n−2A is polynomial in the entries (entries of adj are polynomials; the power n−2≥0 is fine), hence continuous, and vanishes on GLn(R). As GLn(R) is dense in Mn(R), it vanishes everywhere.
Check. For n=2, adj(acbd)=(d−c−ba) and applying adj again returns the original matrix: this is (detA)0A.
Remark. For a singular matrix of rank ≤n−2 both sides vanish when n≥3: adjA=0, so adjadjA=0 and detA=0, so (detA)n−2A=0 (for n≥3).
Lesson. Polynomial identities with a non-negative exponent extend from GLn to all of Mn for free.