Solution:
Imagine , a cylindrical gaussian surface of length L and radius a.
Given rectangular surface ABCD subscribes an angle at the infinity long uniform line of charge.
The total angle subscribe by cylinder is and charge enclosed is .
Flux through the rectangle is same as the flux through of the hexagon since it subtends at P and field lines are symmetrically radially outwards.