This puzzle is actually fairly simple, but it has given a few people a good amount of trouble. The easiest way to do it is to chase the Pokemon into one of the side sections, on the left or right, and have Shauna stand at the bottom-most section. Then go up through the middle and towards the Pokémon, and it should run a little ways up towards the dead end. Next, take Shauna to where the Pokémon was just standing and go to the opposite side from her and walk up towards the Pokemon. It should run into the dead end and you will have caught it.