A curious question.
a) How many different ways exists to put "n" queens on a chessboard and they all can't capture the others?
b)If you put one queen in the chess board knowing that exist one other queen there, what is the probability that the new can't be captured?
This
Pythoncode from the wikipedia page of the eight queens problem mentioned in the comments above will give solutions for all n, but the algorithm is "intractable for n >= 20". A recode in Haskell would solve the problem of dealing with large numbers and would be significantly faster but still would quickly reach an upper limit.This sequence shows the number of solutions for $n \in [1,26]$. For larger numbers the wikipedia page contains an "Exercise in algorithm design" section that should yield speedups, but perhaps none too significant (else the AES sequence would have more solutions).
Part $b$ might be analyzed as follows. Note that any rook on any square has access to $n - 1 + n - 1 = 2n - 1$ spaces (not including the space it is on). The bishop's movement is more difficult to analyze, but given coordinates $(x, y) \in [1,n] \times [1,n]$ there should emerge a movement pattern after a few examples (a proof of which should be pretty clear): concentric movement squares each increase in movement range by $2$ squares as they move in, with the outermost having range $n - 1$. Putting this together a queen at square $(x, y)$ in an $n$-sized grid, WLOG taking $x,y <= \frac{n}{2}$ (because of the concentric squares) has movement range $(2n - 2) + (n - 1) + (min(x, y) - 1) * 2$. From here on it's simple probability. Good luck on part $a$.
Edit: taking the minimum of x and y yields which concentric square it is in, exactly, which was the reason for taking $(x, y)$ in the lower left quadrant. For a sketch of the proof of why the concentric squares trick works, a bishop in the $(1,1)$ (lower left) position has $n - 1$ moves, so moving it out along the main diagonal increases its movement range by one in the top-left, bottom-right, and bottom-left diagonals (respective to the knight) and decreases its range by one in the top-right direction (as we moved it in that direction). This gives a net gain of two movement squares. Repeated application works until we reach the innermost concentric square, where the process begins to reverse. This only considered squares on the corners but squares on the edges work in exactly the same way and a quick example will convince you that the movement range of a bishop on the edge of the board is indeed $n - 1$.