Page table - I don't understand how this table has been made
The addresses given in the first table are virtual addresses in a 12-bit address space, and the purpose of the page table is to map these to physical addresses.  Because pages are 512 bytes and there are 4 physical pages, the physical addresses are 11 bits, made up of a 2-bit frame number and a 9-bit offset.  The page table has eight slots, one for each page in the virtual address space.  (This is, of course, all completely impractical, but that's the nature of textbook problems.)

According to the hypothesis of the question, the page table starts empty with valid=0 in each slot.  Following the sequence of memory references in the first table, the first reference is to page 1.  That is a page fault, because the valid bit in slot 1 is of course 0.  So we bring in page 1 from the disk, put it in physical page 0, and update the page table with

1: frame=0, valid=1


The next reference (2047) is to page 3 -- again a miss.  So we put virtual page 3 in physical page 1, and update the page table with

3: frame=1, valid=1


At this point (just to be clear), the page table contains

0:          valid=0
1: frame=0, valid=1
2:          valid=0
3: frame=1, valid=1
4:          valid=0
5:          valid=0
6:          valid=0
7:          valid=0


so that for each virtual page number we have used, the page table shows the corresponding physical page number.  That organisation makes the hardware-implemented translation from virtual to physical address simple and fast.

Next is page 2, in physical page 2.  Page table entry:

2: frame=2, valid=1


The next reference is to virtual page 2 again, so that does not cause a page fault.  Then virtual page 1 again, also with no fault.  Next is virtual page 0, which goes in physical page 3

0: frame=3, valid=1


The final reference is to virtual page 6, which we haven't seen before.  We need to allocate a page frame, but at this point all 4 of them are in use, so that means evicting an existing page to make room.  To choose the victim, we follow a replacement policy that is implemented in software -- and we're told to use the Least Recently Used policy.  So we look for the resident page that hasn't been used for the longest time, and that's page 3.  We evict that page, bring in page 6, and update the page table to read

3: (frame=1), valid=0
6: frame=1, valid=1


The frame field of slot 3 doesn't matter, but we may as well leave it as 1.  Putting all the entries together, you get the page table shown in your second table.  The frame numbers are, naturally enough, shown in binary there.