A={-4,m^2}
B={m-5,1-m}
A∩B={-4}
case 1:m-5 =-4 ie m=1
m^2 = 1
1-m = 1-1 =0
accept case 1
case 2:1-m =-4 ie m= 5
m^2=25
m-5= 0
accept case 2
ie m=1 or m=5
A={-4,m^2}
B={m-5,1-m}
A∩B={-4}
case 1:m-5 =-4 ie m=1
m^2 = 1
1-m = 1-1 =0
accept case 1
case 2:1-m =-4 ie m= 5
m^2=25
m-5= 0
accept case 2
ie m=1 or m=5