In question you have LAS = PAS = ‘s’ bytes and your page size is ‘p’. So , the number of pages will be s/p . Now page table contain entries equal to number of pages so page table size will be (s*e)/p , that is number of entries multiplied by page table entry size. Now the internal fragmentation exists in last page and that internal fragmentation considered [p/2] , so overall equation we will get is
memory overhead = P.T size + IF in paging
= (s*e)/p + p/2
differentiate this equation w.r.t p , and make it equals to zero , that is -(s*e)/p^2 + ½ =0
and you can get optimal value, p = √2se