Hi Amberbajaj02,
This is similar to a question, where it says, There are five persons (A, B, C, D and E) standing in a row, in how many different arrangements person A will be ahead of person B.
As somebody replied above, it’s a symmetrical case, where in half of the total arrangements A would be ahead of B.
So here total arrangements of 5 things, 5! = 120. So In half of the cases he would visit “X” ahead of Y. so that is 60.
So another way of looking at this question is,
There are five slots,
B _ _ _ _ : So here A could be any of the four places, and the remaining three persons can be arranged in 3!. So that is 4 * 3!.
or
_ B _ _ _ : So here A could be any of the three places, and the remaining three persons can be arranged in 3!. So that is 3 * 3!.
or
_ _ B _ _ : So here A could be any of the two places, and the remaining three persons can be arranged in 3!. So that is 2 * 3!.
or
_ _ _ B _ : So here A could be only one place, and the remaining three persons can be arranged in 3!. So that is 1 * 3!.
So, total (4+3+2+1)*3!
10* 3! = 10 * 6 = 60.
So the answer is E.
Hope this is clear.
PS: I still feel that question should have framed better.