Thank you for this solution Andrei (Andrei Lazanu, School 205 Bucharest) and for the link to the useful site.
First I observed that the probability to move one square up is the same as to move one square left, so it is . After every move the probability to go on one path decreases, so after 4 moves the probability to move from the bottom right-hand corner of the grid to the upper left-hand corner is: . Now, I see it doesn't matter the path on which the star goes, because all have the same length. To calculate this length, I move the star by the side of the square and I observe that on one side of the square, the star moves n - 1 times and on the other also n - 1 times, so, in total 2(n - 1) times. As in the precedent example must be raised to power 2(n - 1), obtaining: . This number must be multiplied by the total number of paths. I tried to find the formula by trying with different squares, but I didn't manage to guess it. I found 2 ways for a 2x2 grid, 6 for a 3x3 one and 20 for a 4x4 grid, without knowing to generalise it.
For a 2x2 grid there are 2 possible ways to get, so the probability to get in the opposite corner is: .
For a 3x3 grid there are 6 different paths to go, so the probability is:
For a 4x4 grid there are 20 paths to go, so the probability is:
I found on the Internet, at the Math Forum, the formula together with the explanation. The address is: http://mathforum.org/library/drmath/view/54218.html. The formula generating the number of ways to go from one corner to another is:
The formula generating the probability to land in the opposite corner in a nxn grid is:
I verified my results and I worked right for n=2, 3 and 4.