Ok, take 2...
I can understand everything except why the grey square has a black square in it.
Because each shape has a white small square at the top half and a black small square at the bottom half.
Why cant the white square have a black square in it?, ie why cant the answer be b?
Because it has to be a shape with the grey fill inside.
If you look at the last item in the second row, it is a shape with the grey fill inside the top half. As the shapes move right by one column, this grey shape drops off from the second row. It then starts at the first column of the third row with a 'transformation'. This transformation is - black fill moves to the top half and the grey fill moves to the bottom half. (This 'transformation' logic can be verified with the behaviour of the shape in the last column of the first row as well).
Also note that the black fill overlaps the entire half where as the white and grey fills expose the inner small square in their halves.
I am sorry if I made it too complicated
Hoping that we can hear simpler logic to solve this from others in this forum.