安いもので doesn't mean a thing was literally inexpensive — 安い here is the figurative 'cheap' of 'a small price to pay,' and もので is the て-form of もの + the copula で, glossable as 'being a [thing of that nature], [next clause].' So 安いもので reads 'being a small price to pay, [and so] everyone was thrilled.' 厄介払い (やっかいばらい) is a noun for 'getting rid of a nuisance / driving off something troublesome' — not malicious, just relieved-eviction. The ~たら conditional sets up the relief: 'if all this took to get rid of the bother, then…'.