Because 5 is a small number we can work as below each exponent
Working in mod 5 we have
$,2^1 = 2,2^2= 4, 2^3 = 8 = 3,2^4=1$
$3^1=3, 3^2 = 9 = 4 , 3^3 = 27 = 2,3^4=1$
so $2^4 + 3^2$ = 0 mod 5 also $3^4 +2^2 = 0$ mod 5
$2^1+ 3^1 = 0$ mod 5 ( n=m)
$2^3 + 3^3 = 0$ mod 5(n=-m)
We have checked for all combinations that it is true