Isn't x <60000 for all 3 cases to start?

if (x < 60000UL) {i = 1000;}

else if (x < 120000UL){i = 2000;}

else if (x < 300000UL){i = 5000;}

So what's the code to do?

Maybe try changing your conditions to make them unique:

if (x<= 60,000) (commas added for clarity)

if (x>60,000 & x <=120,000)

if (x> 120,000 & x <=300,000)