Tommy had 35 more bugs than Diego. They had 103 bugs altogether. When Diego lost some bugs, Tommy had 3 times as many as Diego. How many bugs had Diego lost?

t = d+35

t+d = 103
t = 3(d-x)
after a little substitution, you can see that x = 11