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

### Instruction:
 Roselyn anampa Mara vitabu mara tatu ya vile anavyompa Rebecca na anabaki na vitabu 60. Ikiwa Rebecca alipokea vitabu 40, Roselyn alikuwa na vitabu vingapi awali?


### Response:
 Ikiwa Roselyn alimpa Rebecca vitabu 40, na Mara alipewa vitabu mara tatu zaidi, Mara ana vitabu 3*40 = <<3*40=120>>120.
Jumla ya vitabu vya Rebecca na Mara ni 120+40 = <<120+40=160>>160 vitabu.
Ikiwa Roselyn alitoa vitabu vyake kwa Mara na Rebecca, ambavyo ni 160, basi awali alikuwa na vitabu 60+160 = <<60+160=220>>220.