I play as white. I have a rook and queen and 5 pawns while the opponent has a knight and two pawns. I hope I can win this game. But is it legal to take the knight in next move? Then the opponent will have only two pawns with the King. Can I still play after that and win the game?
It's perfectly legal to take his knight and his two pawns, then promote all your five pawns, and mate him with rook and six queens. Watch out for stalemate, he must be able to move his king without going into check at all times.
There are no rules saying you can't take any more of your opponent's pieces.
A quick answer is that it is legal as long as you are not in check and you will not be in check immediately after making the move and you are moving your pieces according to the rules. The only risk I can see with grabbing the knight is that you can cause a stalemate and the game will be drawn. A stalemate is where your opponent cannot make any legal moves and at the same time the opponent's king is not in check.