Let us understand through Venn diagram :
Let x : Number of students who play only cricket
y : Number of students who play both cricket and football
z : Number of students who play only football
t : Number of students who play neither of the games = 400 - (x + y + z)
According to the question :
400 - (x + y + z) = y - 26
==> x + 2y + z = 426 ............(1)
According to second constraint :
z - y + 400 - (x + y + z) = x - y + 400 - (x + y + z) + 40
==> z = x + 40 ..........(2)
Hence substituting (2) in (1) , we have :
2(x + y) = 386
==> x + y = 386 / 2 = 193
So ,
Number of students who play football = y + z = y + x + 40
= 193 + 40
= 233
Hence number of students who play football = 233