Hi, thanks for the question. My name's XXXXX XXXXX I'm going to assist you with it.
If you have no contract with this electrician, then you do not have to pay this invoice. When you originally instructed the builder the agreement was for him to carry out specified works within a particular period of time. It appears that he has breached the contract on a couple of counts, including overunning by almost 3 months. On that basis, you and the builder have apparently agreed to vary the contract by reducing the contract price (as you would be using your own contractors to finish off the work) and reducing his obligations to the work already carried out.
You have also offered to pay him an amount equal to the difference between the amount you pay for these contractors and the balance owed. Considering that you need to manage these new contractors yourself and that you have suffered inconvenience due to his delay and poor workmanship, this was generous of you.
It is for the builder to deal with his subcontractors and if he has suffered any loss as result of their workmanship or is to withold payment to them (legitmately or otherwise), that is up to him. If you had no contract with the electrician, he has no basis on which to invoice you.
Does that answer your question. If so, please take a moment to rate my answer positively so that I can obtain credit from the website. Our conversation will not close, so please don't hesitate to ask anything you need to clarify any of the information above.