You can't tap a cable like that - NEC has a whole section called the "tap rules" which describe when you can do that, and this is not one of those times. Even if you could, it would be a lost cause: Since a washer must be provisioned for 20A, that plus the 30A dryer puts you at 50A, and you'd need to run the expensive 6/3 cable.
Here's what you can do:
Pull a 12/2 cable alongside the 10/3 cable
That may seem stupidly obvious, but for the cost of a 12/2 cable, you are done. It will take an additional breaker space.
Run 6/3 and install a subpanel
You can run 6/3 cable instead of 10/3, terminate at a small subpanel, then have a 2-pole 30A breaker for the dryer and a 1-pole 20A breaker for the washer. I believe the subpanel would need to be at least 50A.
Run 10/3 to a subpanel with a "generator" interlock
Use the interlock so you can only operate the 30A breaker for the dryer, OR, the 20A breaker for the washer. You would have to throw the breaker every time. Very tedious. This will get old fast.
Buy a washer-dryer set that's designed for that
Large housing complexes are typically out to minimize the utility work they must put in laundry rooms. Industry caters to them with washer-dryers designed to run together off a 30A/240V receptacle only. They are either sized correctly, or have logic to manage electricity usage so they can't overload the 30A circuit. They make combo units (washer + dryer in one unit) which tend to be tenant-tier cheap in their feature set... or they make matched set washers + dryers which can be deluxe, but expensive.