@John Nguyen
I am assuming your 45 day identification period has expired and hence cannot swap property B for another one.
In this case, you will most likely have to pay taxes on the balance. You can do a google search for a 1031 tax calculator to get a ballpark idea (you will need a few data entry points (sale price, depreciation taken, balance on the loan, 1031 fees, etc.) You can also talk to your CPA to get a quick ballpark number. Overall it should not be a huge amount given that you will use some of the funds.
Answers to other questions:
Yes, you can purchase other properties. If you are in the 45-day identification period you can just swap the proposed property with the intermediary. If not, you may have to wait until to actually close on the property A and request disbursement of the remaining funds.
To my knowledge, there are no time restrictions on long you have to wait. You just have to meet the criteria and adhere to the 1031 exchange rules (45 days to identify - 180 to close).
Good luck