Răspuns:
fie a = capre
b = gaini
c = gaste
a + b + c = 130
b = 5c
a + 5c + c = 130
a + 6c = 130 => a = 130 - 6c
4a + 2×6c = 268
4(130 - 6c) + 12c = 268
520 - 24c + 12c = 268
520 - 268 = 24c - 12c
12c = 252
c = 21 gaste
b = 5c = 105 gaini
a = 130 - (21+105) = 4 capre