This is, from a high level, simple.
You will not be able to extract any more "cash" than the lender believes will be reasonable for you to pay back AND still have sufficient equity that you won't walk away.
You will not be able to tap more than about 80% of the equity of your "primary residence" (for lender purpose this will match the state that you file income taxes in, unless there are extraordinary circumstances). For your "vacation home" you will likely be limited to about 50% of the equity.
You will need sufficient income to carry this debt as well as total debt-to-income ratios that are within lender standards.
Debt to Income Ratio Calculator - Mortgage DTI Ratios