Below is an instruction that describes a task. Write a response that appropriately completes the request in Swahili. Please answer in Swahili.

### Instruction:
 James na Ali pamoja wanamiliki $250. Ikiwa unajua kuwa James anamiliki $40 zaidi ya Ali, basi tafadhali hesabu kiasi anachomiliki James.


### Response:
 Hebu X iwe kiasi anachomiliki James. Kiasi anachomiliki Ali ni X - $40.
Jumla ya kiasi wanachomiliki wote X + (X - $40) = $250.
Kwa kuunganisha vipengele sawa, tunapata X*2 - $40 = $250.
Kwa kuongeza $40 kwa pande zote na kuzidisha kwa mabano, tunapata X*2 = $290.
Kwa kugawanya pande zote kwa 2, tunapata X = $145.