Answer:
24 apples and 40 pears
Explanation:
Originally:
The ratio of the number of apples to the number of pears in a basket was 3 : 5.
Number of apples = 3x
Number of pears = 5x
Finally:
After 7 more apples were added to the basket and 9 pears were removed, there were an equal number of apples and pears.
Number of apples = 3x + 7
Number of pears = 5x - 9
Hence,

Solve it:

Originally, there were
apples
and
pears.