Lets solve for case A where average monthly costs becomes $3000. You should be able to solve case B($2500) and case C($1500) similarly.

Let this happens after x months.

The total amount paid in those x months = $22000 + 1800*x

Now avg. monthly cost = total amount paid/total no. of months = (1800x+22000)/x = 3000;

Solve for x to get the no. of months.

I got in fraction though (18.333 months)!