No. of entries in outer page table = 4KB/4B = 1024, so 10 bits for this.
Now, we can't directly go to level 2, so lets go to final level.
In final level we need a page table entry for each page. Let the virtual address space be $2^p$, so no. of entries will be $\frac{2^p}{\text{page size}} = \frac{2^p}{4 \times 2^{10}} = 2^{p-12}$.
Now, these entries are spread across different tables. We are not sure how many of these entries are going to 1 third level page table. For this, lets assume a third level page table takes size of a page- 4KB.
Now, no. of entries in a SINGLE third level page table $= 4KB/4B = 2^{10}$. So, no. of third level page tables $= \frac{2^{p-12}}{2^{10}} \\=2^{p-22}$.
Now, we need second level PTE for each of these third level page tables. i.e., sum of PTEs in second level $=2^{p-22}$.
Again lets assume a second level page table takes size of a page- 4KB.
Now, no. of entries in a SINGLE second level page table $= 4KB/4B = 2^{10}$. So, no. of second level page tables $= \frac{2^{p-22}}{2^{10}} \\=2^{p-32}$.
Now, we need an entry in first level page table for each of these second level page table and there is only 1 first level page table. We already got this is 1024 in our first step. So,
$2^{p-32} = 2^{10} \\ \implies p-32 = 10 \implies p = 10 + 32 = 42.$
So, size of virtual address space $ = 2^{42}$ bytes.
But don't forget the size of page tables we assumed during calculation - this might be different in other questions.