Section 74. If a person injured in his person or property by a defect in a public way caused by the operations of a corporation subject to this chapter, in laying down or repairing its pipes, or in laying, erecting, maintaining or repairing its lines of wires, or in otherwise obstructing such way, recovers damages therefor in an action against the town where such injury is received, such town shall, if said corporation is liable for said damages and has had reasonable notice to appear and defend the original action, recover of said corporation the damages so recovered from it, with the taxable costs of both parties in such original action.