Submatrix sum method 2

In thid figure point (i,j) is the one in blue or the one in yellow?

And if (i,j) is the one in blue then the point in green should be (x,j) and not (x,j-1)

similarly, the purple point should be (i,y) not (i-1,y)

Please explain!

Yeah (i,j) is the one in yellow. Rather than focusing on the colors actually, just try to imagine them by yourself and try to apply the logic. You should be ale to understand it.

Please someone solve this account