Confused with 960 castling from some specific positions.


These are both illegal positions in 960 rules. The back rank is randomized with two stipulations:
- The king must be between two rooks.
- There must be both a light-squared and dark-squared bishop.
So it's good your confused about how to castle in both of these positions because they actually are not allowed in 960.