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

### Instruction:
During a soccer game, in the first half, Team A scored 8 points, and Team B scored only half as many points. In the second half, Team B was able to get as many points as Team A in the first half, and Team A scored only 2 goals less than Team B. How many goals did both teams score during the whole match?

### Response:
 Katika nusu ya kwanza, Timu B ilifunga magoli 8 * 1/2 = <<8*1/2=4>>4.
Katika nusu ya pili, Timu A ilifunga magoli 2 chini ya Timu B, hivyo waliifunga magoli 8 - 2 = <<8-2=6>>6.
Hivyo jumla ya magoli yote yaliyofungwa na timu zote ni 8 + 4 + 8 + 6 = <<8+4+8+6=26>>26.