If f is a function and f(x)=f(y) then x=y.
Therefore cos(x)=x-π/2 for the δ function, if that is what δ is.
What remains now is to prove that cos(x)=x-π/2.
The solution of this is x=π/2.
So for δ(cos(x))=δ(x-π/2), x=π/2. It follows, then, if x is known to be equal to π/2, then δ(cos(x))=δ(x-π/2).