Yes, it is okay to have laundry sink (3 fixture units) and washing machine (3 fixture units) on the same trap arm, but your trap arm must be 2" pipe with a max total length of 8' from stack.
1 1/2" pipe -- 2 fixture units.
2" pipe -- 9 fixture units.
[add]
you need a Y loop thingy, trap something, lets google
Do you mean a tee for the 2 fixtures to connect to the same trap arm, or a Wye (y) for drainage, or 2 P-traps for the fixture seals?
Put a standpipe off the trap for the washer.
That is how one would do it, however the trap arm must be 2" & the base of the standpipe must have a P-trap. Standpipe length depends on each region local plumbing code.