Let us join the missing lines and denote the central point of the square as Z.

Shortest path is 8 steps away and 4 of which go horizontally right and 4 of which vertically up. The order of the first four decides the order of the rest four.

But in our given square the central lines are missing, so we need to subtract those paths which go through the center.

Now the number of ways of going from X to Z (similar to as explained above) =

^{4}C

_{2} = 6

Similarly, number of ways of going from Z to Y (similar to as explained above) =

^{4}C

_{2} = 6

Hence, total number of ways of going from X to Y through Z is 6 × 6 = 36

Hence, the required number of ways = 70 – 36 = 34

Hence, option 3.