We can write the cost function as :
cost(x) = 120x + 36(100 - x)
= 120x + 3600 - 36x
= 84x + 3600
So we can see that it is a strictly increasing function hence x = 0 will give minimum cost i.e. at town B.
If we write w.r.t. town A , we get :
cost(x) = 36x + 120(100 - x)
= 12000 - 84x
So we can see that it is a strictly decreasing function hence x = 100 will give minimum cost i.e. at town B.
So , in either case we get the town B as the place where we get minimum cost.
Hence D) should be correct option.