let number of tomatoes = T, no. of peppers = P , and no. of carrots = C
T = P + 2
C = 2T
C + T + P = 10
Now substitute these equations into each other:
2T + T + P = 10 = 3T + P = 10, P = 10 - 3T
P = T - 2 = 10 - 3T
4T = 12, T = 3
So there are 3 tomatoes.
And if there are 3 tomatoes then there are:
C = 2T = 2x3 = 6
So there are 6 carrots.
So peppers equal:
P = T - 2 = 3 - 2 = 1
So there is 1 pepper.
Which if you check equals: P + T + C = 10 = 1 + 3 + 6