Here is my current idea:

Take two λ-terms: A,B

(λy.λx.x)AB = B

(λy.λx.yx)AB = AB

Under our assumption B = AB, thus A is the identity function.

(λy.λx.x)BA = A

(λy.λx.yx)BA = BA

Under our assumption A = BA, thus B is the identity function.

Thus A = B.

Does this proof sound reasonable? Is the identity function unique?