I was wondering if you could legally castle and take the knight with your rook.
Castling and Capturing

That's an interesting question but as I understand the rules of castling one can not do it if there is any piece between the king and the rook. I would think that this would apply to an enemy piece as well.
Can the white king castle here and capture the knight?