A note on traps and their waste pipes:
The trap always goes as close to the plug as possible as it is the prevention of drain smells rising up through the system. The exception to this is a washing machine outlet trap that is placed just above the floor with a waste pipe rising up to the very top of the machine to take the flexible drain hose off the washing machine.
Sometimes a tee junction may be placed underneath the trap on the laundry tub and run up to the near side of the washing machine to take in the drainage hose.