First of all I am assuming some of the facts because the question does not state them.
I assume array is stored in row major order and i is used for accessing row and j is used for accessing column. As page size is specified in number I am assuming it is going to hold 200 elements of the array.
Now it is saying memory has 3 frames and as said earlier 1 frame will be always occupied by the process so we have left with 2 frames.
Lets analyse second loop first as it will be easy:
(b)
Total number of elements will be =100*100=10000.
So 10000 contiguous memory will be allocated to array in the form R1, R2... where R stand for row. As the page size is 200, at the start of loop 0-199 elements will come to main memory in one page after an initial page fault. After that when we reach 200 the second page fault occurs. Thus for every 200 element 1 page fault is occurring. So 10000/200 = 50 page faults.
(a)
For 1st loop, I am drawing the image diagram.
You may guess that now blue element will be needed for which another page fault will occur and we will be accessing only 2 element per page fault. So number of page faults =10000/2=5000.
This concept can be extended if page size is given in kB and array element size is taken as 4B- just count number of array elements in one page. I think now you have understood the concept.