.
Let's assume that we consider only ORDERED placings. It means that we consider placings (M,T) and (T,M) as different,
i.e. we account for the order.
Then the total space of possible parking (without imposed constraint) is N*(N-1).
(they can place their car in any two different positions, but not in one position simultaneously).
The number of possible placings under imposed constrain is 2*(N-3).
The factor 2 accounts for the order (M,T) or (T,M).
Thus the probability under the question is this ratio
. ANSWER
-------------
Comment from student : Thank you so much for your time and help!
But I'm a bit confuse that how total space of possible parking (without imposed constraint) is N*(N-1) ?
-------------
My response : Mary can park her car in any of N parking spots.
Then Tom can park his car in any of remaining (N-1) parking spots.
It gives N*(N-1) possibilities.
By the way, everybody who solves such problem, must know this logic and use it freely in their solutions.