Let's try making 40,000 popsicles and see how much it costs. Old: 8K to fix it in 40,000/40*4=4000 to maintain it for 12K total vs. new: 20K to buy a machine + 40,000/60*3=2000 to maintain it for a total of 22K! Nope. But now we can substitute x for the number of popsicles to see when they become a tossup.
8K+4x/40=20K+3x/60
x/10=12K+x/20
Using a LCD of 10 for the fractions:
x/20=12K
x=240K
That's a lot of popsicles!