To do this properly, You'll likely have to run a new circuit. Since you haven't posted the make, model, or nameplates of the equipment, it's impossible to say for sure if these two devices can be on the same circuit. If they can, the solution is to extend the circuit using approved methods and materials. If they can't, the solution is to run a new circuit.
As for making an extension cord, that's not the best option. Extension cords are for temporary use only, and should not be used in place of permanent wiring.
WARNING:
Using an extension/adapter cord like this is dangerous, and can lead to loss of property and/or life. This is a theoretical device, that should never exist. DO NOT make, use, or even think about a device like this.
If you're dead set on making and extension/adapter, you'll want to use proper sized conductors and protect the cable from physical damage.
Since you're plugging it into a 50 ampere circuit, you'll have to size the conductors to be able to carry 50 amperes. This is not typically the way it's done, but this is not a typical solution. If the A/C overloads, you don't want the cord bursting into flames. So since the overcurrent device is set to 50 amperes, you'll have to have appropriately sized conductors.
A safer option would be to build a smaller overcurrent device in to the adapter, to protect the cord and A/C unit. In this case you'd have 50 ampere conductors attached to a NEMA 14-50 plug, with the other end of the conductors connected to some form of 30 ampere overcurrent protection. Then from the 30 ampere overcurrent protection, you'd run 30 ampere conductors to a NEMA 6-15 receptacle. Then you could plug the A/C into the 6-15 receptacle.
WARNING:
Using an extension/adapter cord like this is dangerous, and can lead to loss of property and/or life. This is a theoretical device, that should never exist. DO NOT make, use, or even think about a device like this.
The safest option would be to install a new panel, and have it being fed by the conductors that are currently feeding the 14-50 receptacle. Then you can branch to each of the devices from the panel, using proper methods and materials.