Shop A and Shop B sell chairs with 3, 4 or 5 legs. Shops A and B have a total of 443 and 157 chairs for sale respectively. During a Year End Chair Sales Exhibition Shops A and B set up sales booths beside each other and the sellers from both shops realised that their chairs altogether have 2015 legs in total. They also realised that there are twice as many 3-legged chairs from both shops as 4 and 5-legged chairs from both shops for sale. They later sold all 3, 4 and 5-legged chairs at $15, $20 and $25 respectively, with both shops earning a total of $10,075 in sales revenue.
How many 5-legged chairs both shops sold in total?
Photo credit: http://www.clker.com/clipart-shop.html
This problem is part of the set 2015 Countdown Problems.