Cash at closing??

Scenario:
Found a home (for my personal residence) on tax roll at $174,000 w/ 1st lien of $141,000 and 2nd at $17,000. Home was recently appraised by 2nd lienholder at 166,000.
To prevent foreclosure homeowners & 1st lienholder have agreed, via listing agent, to a short sale at $148,000 with 2nd lienholder agreeing to release his lien for $2,000.
I need to spend about $18,000 (at my costs) on house to bring it up to a value of about $185,000 but I can only borrow $148,000 (sales price). How can I increase my loan amount to $166,000?
Can the present homeowner grant me a voluntary lien (based upon their promissory note to me or ?) that places me in a 3rd position, which raises to the 2nd position after the $18,000 lien releases? Then the $18,000 will pay the lien off at closing.
Will the title company and/or new lender investigate the liens and their origin or just verify that they are valid, recorded liens and verify that they are released upon payment at closing?
How do the real estate “gurus” walk away from the closing table with money?
All ideas appreciated!
Southland2003.