Your table breaks first normal form.
The columns teamA and teamB are the same column. There is nothing special about teamA; the combination white-red could be red-white without loss of meaning.
Note however that if you were using teamA to indicate home team that also breaks first normal form.
Once you normalize, summing the scores is trivial.
CREATE TABLE GameScores
(
id INTEGER,
team TEXT,
score INTEGER
);
INSERT INTO GameScores (id, team, score)
VALUES (1, "white", 10), (1, "red", 5),
(2, "red", 18), (2, "white", 7),
(3, "white", 6), (3, "red", 3);
SELECT SUM(score) FROM GameScores WHERE team = "white";
I assume the team ids are for illustration only and that in practice you use neutral ids.