I don't understand the castling part of this - you can move a rook from its starting square and back and castling isn't available - it says that you can determine whether castling is available from the location of the pieces?
If the rook has the king's position, it's never moved. As soon as it moves, it can have any position except the king's.
If the rook has the king's position, it's never moved. As soon as it moves, it can have any position except the king's.