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

### Instruction:
Jason is counting the number of cars that drive by his window. He counted four times as many green cars as red cars, and 6 more red cars than purple cars. If he counted 312 cars total, how many of them were purple?

### Response:
 Hebu tuchukue g kuwa idadi ya magari ya kijani, r kuwa idadi ya magari ya nyekundu, na p kuwa idadi ya magari ya zambarau. Tunajua kwamba g + r + p = 315, r = p + 6, na g = 4r
Badilisha equation ya pili kwenye equation ya tatu ili kupata: g = 4r = 4(p + 6) = 4p + 24
Sasa badilisha equations ambazo zinaelezea g na r kwa p kwenye equation ya jumla ya magari: 4p + 24 + p + 6 + p = 315
Sasa unganisha vipengele sawa ili kupata 6p + 30 = 312
Sasa toa 30 kutoka pande zote mbili ili kupata 6p = 282
Sasa gawanya pande zote mbili ili kupata p = 47