firstly, you did not update the value of c, because you equating it with i every time. Thus, the c will be replaced for every if condition is met.
secondly, i=i+(j,k) will combine two list together. for example, in your case when you equate i = (7,6) and j = 7 and k = 2, (by observation, the if-condition is met) then the i = (7,6,7,2).
I believe this will solve your problem.
a=[(4,5),(7,6),(3,2),(9,6),(25,7)]
b=[(4,6),(7,2),(6,1),(57,12)]
c=[]
for i in a:
m,n=i
for j,k in b:
if m==j:
c.append(i)
break
for i in b:
m,n=i
for j,k in a:
if m==j:
c.append(i)
break
print (c)