Any parties so related, failing to comply with section 34-50-101 for the drainage of the mines owned or occupied by them, thereby imposing an unjust burden upon neighboring mines, whether owned or occupied by them, shall pay respectively to those performing the work of drainage, their proportion of the actual and necessary costs and expenses of doing such drainage to be recovered by an action in any court of competent jurisdiction.