Another way of doing this is to note that, if you add together the three initial expressions, each of the three items will appear twice. That is, 2 x (tomato + potato + pepper) = 19 + 16 + 17 = 52, so tomato + potato + pepper = 26.
As tomato + potato = 19, pepper = 26 - 19 = 7.
As potato + pepper = 16, tomato = 26 - 16 = 10.
As pepper + tomato = 17, potato = 26 - 17 = 9.