Well according to the answers, all of the shapes are hexagons. So you have 3 hexagons stacked on top of each other. So from the top view, figure out where the top hexagon is located (either front, offset left, or offset right.
Answer A shows that the top hexagon, is left. Which is why you see solid lines on the left hexagon.
Answer B shows that the top hexagon is in front of all others.
Answer C shows top hexagon to the right.
Answer D shows it to the right as well.
From our clues, (end view) we know that the top hexagon is in front of all of the other hexagons. Therefore, answer B is correct.
Let's confirm B. From the front view, we see that the middle hexagon is on the right. Looking at Answer B, we see that the right shape has solid lines and the left shape has dashed lines. This means that the left hexagon is the bottom shape.
Hope this makes sense.