The Legal Fees are Deductible to your Business and you may expense the additional amount that you paid the second vendor to complete the job. You can deduct the attorney's if they are going to produce Taxable Income.
If any money is produced by the Lawsuit it must be entered into your business' Gross Income. The expenses of Legal Fees and the additional amount paid to the Second Vendor will offset the Income produced by a lawsuit. If you created a gain from this lawsuit it will be taxed.