I see at least 4 problems, pros may well see more. First, you have an illegal S trap, not a P trap. Second, the drain is reduced in size where it enters the main drain. NEVER reduce a drain size. Third, the tee in the drain is the wrong type, and fourth, the standpipe should be at least 24" high. This may be a problem depending on your washer's pump capacity to lift high enough. I'd say the main reason for the overflow is the bottleneck created by the reduction at the end of the S trap. I'd also get rid of the trap with the plug in the bottom.