What is the rule or the error involving, for example;
I need a box to put my groceries in.
vs
I need a box in which to put my groceries.
What is the rule or the error involving, for example;
I need a box to put my groceries in.
vs
I need a box in which to put my groceries.
The only real difference is casual vs formal language (pure preference in 99% of situations).
I need a box to put my groceries in.
is casual, as it ends in a preposition.
I need a box in which to put my groceries.
is the more formal version of the same statement (not ending in a preposition).
See here for more.