Gabriel and James had a total of 40 toy cars at first. After Gabriel bought another 16 toy cars and James lost 2/5 of his toy cars, they had an equal number of toy cars left. How many toy cars did Gabriel have at first?

See other post.