Washing machine outlet box

Is it acceptable to use a outlet box and instead of draining into the drain pipe instead into the wash tub??? Reason being the drain is only 1 1/2" going into the floor so it would have to drain into the tub and it is located about 4 feet away from the washer. Or would it have to use the hose on the washing machine and drain directly into the tub. The outlet box is still using the 2" pipe with a 18" standoff and with a 1/4" per foot slope into the tub. This is in Minnesota

Sounds fine, but a little confusing. Posting a pic would help immensely.

Yes you sound a little confusing to me also but typically the drain is acceptable as long as there is a air gap between the washing machine drain hose and the sewer line. Here is a pic of one we had in the basement last week it drained into a copper stand pipe and into a old shower basin

It will not let me post a picture, but the washer supply box is going to be located behind the washing machine. The drain will be inside the finished wall going behind the dryer then into a wash tub. The plan is to still use a 18" standoff and go over about 4 ft. discharging into the washtub. Essentially the same concept in the above picture. Instead of going straight down it will be horizontal. Thank you guys for all your input, so much appreciated!