Here the number of pages are $8 = 2^3$, so you need 3 bits to represent page no field, $1024 = 2^(10)$ words per page hence you need 10 bits to represent offset. Now the number of offset bits in both logical and physical address will be the same.
Physical memory is divided into $32 = 2^5$ frames hence we need 5 bits to represent frame no.
So the logical address would be 3 + 10 = 13 bits long
and the physical address would be 5 + 10 = 15 bits long.