The common structures
You can draw a line of credit before listing, take cash out through a refinance, or sell first and carry proceeds forward. Each has a different effect on timing and on your debt ratio.
A line drawn before you buy is often the most flexible, because it is in place and ready when the right property appears.
Qualifying for both
Unless the first home is sold or has a documented lease, underwriting counts both housing payments. That is usually the real constraint, not the down payment.
Run the two payment scenario before you shop, so you know whether you are a contingent buyer or a genuinely independent one.