A tailor had some black buttons, white buttons and red buttons. The number of black buttons was 80% of the number of white buttons. The number of red buttons was 50% of the number of black buttons. After the tailor used 80 of the black buttons and bought another 80 white buttons, he had 50% as many black buttons as white buttons left. How many red buttons did the tailor have?

what do you know?

b = 4/5 w
r = 1/2 b
b-80 = 1/2 (w+80)
solve for r