Can I install a 50 amp breaker for both the car charger and the dryer? When I use the dryer I am not use the car's plug. It was 30 amps.
NO WAY! You probably have 10ga wire to the dryer which is generally good for 30 amps. And now you want to pull 50 amps on the wire/cable? ....with the possibility of someone after you sell the house, runs the dryer and EV charger at the same time, potentially pulling as much as 80 amps on a 30 amp cable!!!!! Run dedicated circuits with appropriately sized wire/cable gauges and appropriately sized breakers.
What you are proposing is a total hack job, not safe, not code legal. If your house burned down and they knew of your setup, you'd probably be denied a settlement.
DO IT RIGHT!
Option 1: Commission the EVSE at 30A breaker (not 50A)
The amperage on your EVSE is just a setting, because EVSEs work like this.
The dryer receptacles are not made for frequent interchange. However, if your dryer has a 4-pin socket (not 3-pin), and you're willing to swap plugs every single time, then you have one option: When you are commissioning the EVSE, set the circuit breaker size to 30A. This will cause it to charge at a lower rate, but it will be safe and legal to share a 4-prong dryer outlet.
You will need to change the EVSE's plug to a 14-30 type, but cords of that type are readily available cheap.
Option 2: For certain panels, use a "Quadplex" breaker.
This has a 30A breaker and a 50A breaker both, in the space of a normal 240V breaker. The 30A circuit goes to the dryer. The 50A circuit goes to the EVSE.
That means you run a new 50A circuit to the EVSE with new wires to the correct socket (NEMA 14-50 or 6-50). You would need #6 NM or UF cable. If you don't want to pay for that, look for a socket which is labeled "CU-AL" and "75C" and run #6 aluminum cable. Aluminum is fine if you use the goop and set the screw torques correctly.
You must get a quadplex breaker that is compatible with your panel, usually, the same brand. That is not possible on all panels. If you ask a question about your panel compatibility, take photos of it and a clear photo of the panel labeling, we can advise you here.
No, you can't put multiple outlets on circuits for these appliances:
NEC 625.40 requires an individual branch circuit for EVSE.
NEC 110.3 says equipment UL/CSA/ETL Listed Equipment must be installed per the installation instructions which for your dryer likely says it needs to have a separate 30A circuit (like shown here on Whirlpool page 4 and 6).
A 50 circuit would not provide adequate protection for a 30A appliance, an overload of 150% wouldn't trip a 50A breaker.