Julia made 154 keychains. Lucy made 540 keychains and Ruth made 350 keychains. After Lucy gave an equal number of keychains to both girls, Julia had half as many keychains as Ruth. (a) How many keychains did Lucy have left? (b) How many keychains did Julia and Ruth have altogether in the end?