So you know that the page size is 4 Kbytes. So if there is an array lets say of infinite length. You are accessing it from 0 to infinity in a for loop. The first access of the array X will cause a TLB miss and load the first TLB. then for next 4095 accesses, it will not be missed because it is present in the TLB( remember this is because the Page size is 4096 = 4KB ) So then the next address is X which will cause a TLB miss. Thus you see that for every 4096 address increments you will have a TLB miss. So we are sure that M = 4096/sizeof(int).
Now you also know that you have 64-entry TLB cache. So after 64 entries of TLB are loaded, you will have a full TLB. To load the 65th entry, you will have to remove the first entry. So you need the size of 64 * 4096 = 256 KBytes, to fully utilize the TLB cache. However you want to have a TLB cache miss for every step. So for 64 entry TLB cache you need array size which will be equivalent to 65 entries. Thus N = 65 * 4096 / sizeof(int).