As the damage came from your property, your neighbour can sue pretty much whoever may be responsible for the damage, which would include you. As such, s/he can sue you and/or your contractor for damages.
However, if s/he only sues you, you can add your contractor into the proceedings and claim against him. You'd effectively be saying that if any damage was caused, such was the fault of the contractor, and thus you're claiming full and complete indemnity for any damages your ordered to pay. In other words, if the court finds you liable for $10,000 to your neighbour, in the same action, you'd then say that your contractor must reimburse you this entire amount.
If the contractor is not a party to the action (i.e. if your neighbour only sued you so you need to add the contractor) then it would be done by a 'Third Party Action'. If the contractor is being sued as a party to the action (i.e. if your neighbour is suing both of you as co-defendants) then it would be done by a 'crossclaim' against the contractor. Whatever the case is though, the end result is that you are claiming against your contractor for any amount you are found liable to pay. This can include any legal costs you incur in the proceedings.
As for legal costs, it's not that simple. It is at the judge's discretion, though generally, the winner gets awarded costs. However, if the winner was awarded less money than the defendant's settlement offer is for, then he gets less costs. Similarly, if the defendant gets a settlement offer but rejects it and is ultimately found to have to pay more than that amount, then the defendant will generally get penalized and have to pay more.
But again, any costs you are found to owe, you can claim back against the contractor.
Hopefully that is of assistance.
If you are satisfied with my answer, please provide me with a positive rating so I can receive payment. Thank you.
DISCLAIMER: My communication is general legal information only and is not intended to be relied upon. This information is not legal advice, nor is it a substitute for such, and if you are seeking legal advice then it is recommended that you retain an attorney. There is no guarantee as to the accuracy of this information, nor shall I be held liable for any claim, demand or damages, actual or consequential, of any kind or nature, known or unknown, arising out of or in any way connected to this information or the issue it pertains to. No solicitor-client relationship has been created by this communication.