The ratio of the number of toy cars Ed has to the number of toy cars Pete has was initially 5:2 but, after Ed gave 30 toy cars to Pete, they each had an equal number of toy cars. How many toy cars did they have altogether?