As far as the mix of wire sizes and components, the key steps are:
- Determine actual circuit size needed: 20A
- Make sure that all wires are equal to or larger than the minimum size required for that circuit (20A == 12 AWG): 10 AWG (existing), 10 AWG whip - all good. Obviously must use at least 12 AWG from existing receptacle box to disconnect, but I would recommend 10 AWG so the entire circuit can be upgraded to 25A or 30A in the future if needed.
- Disconnect size equal to or larger than circuit size: 60A (Which may seem like overkill, but they are so inexpensive that it make sense.)
You've got conduit. Add a ground wire. Done.
Even though you had a 3-wire dryer receptacle (no ground), the box and metal conduit may already be part of a legitimate ground connection. If so, extend to the new location using metal conduit (only certain types, some do not actually qualify as ground) or start a ground wire in this box (along with the wires you connect to the existing yellow hot and (if you need it) white neutral wires) and screw it into the metal box and it is your ground. If it turns out the existing conduit (we can't tell the type from the picture) is not a valid ground path, then add a ground wire going back to the breaker panel.
Because you have conduit here, which is relatively uncommon, it is quite possible that you must use conduit everywhere. That is the case in some large cities and very much jurisdiction dependent. Check that out before adding any NM cable. If you end up using conduit, the new hot wires can be yellow to match the old wires or they can be black or red or blue - almost any color except white (always neutral in conduit) or green or bare (always ground everywhere).
Original from before picture. This is still relevant for the very similar (and probably more common across the US) situation of cables instead of wires in conduit:
The remaining question then is whether you can reuse the existing wiring from the panel to the receptacle or not. You have a 10-30 receptacle, which has been obsolete for a very long time. It may or may not have a ground wire, which is required for both a new dryer installation and for anything else (like AC). Assuming you have cables and not conduit (if you have conduit then you add or replace wires as needed and this is all a non-issue), there are 3 likely possibilities of what you will find behind the receptacle:
- Black/white/red/bare - All set. Use the black and red for hot, white for neutral if you need it, bare for ground. This can happen if there was originally a 4-wire receptacle and it was replaced with a 3-wire receptacle to accommodate a 3-wire plug from a dryer instead of replacing the plug/cord on the dryer.
- Black/white/bare - Bare wire (possibly correctly, possibly incorrectly) was being used as neutral. Use black and white for hot (mark the white with black or red tape on each end) and bare for ground. Everything is good as long as you don't need neutral for the outside unit.
- Black/red/white - This is a problem. While neutral can sometimes be bare (and then turned into ground as needed), ground can never be white (it must be bare or green). If you were trying to turn this 3-wire dryer receptacle into a 4-wire receptacle then you could run a separate ground wire (this is the exception to "all wires must be in the same cable"). However, you are trying to reuse these wires and extend to a new location/new function, so that doesn't apply. You're probably stuck.
So there is a non-zero chance that you can indeed do this.