Angelica is making fruit baskets. She has 3 bags containing 35 tangerines each. She has 4 bags of apples. Using no particular combination of fruit, Angelica was able to make 13 fruit baskets with 13 pieces of fruit in each basket. Each bag contained an equal number of apples. How many apples, a, were in each bag?

Write the equation, solve it out and provide the solution.