There were some Romance and Fantasy novels in a second-hand bookstore. The number of Romance novels was 3/5 of the number of Fantasy novels. After an equal number of fiction and Romance were sold, the ratio of the number of Romance to the number of Fantasy novels left was 5:9. There were 240 books altogether at first. How many books were sold altogether?

R = Romance novels

F = Fantasy novels

The number of Romance novels was 3/5 of the number of Fantasy novels means:

R / F = 3 / 5

Cross multiply

5 R = 3 F

R = 3 / 5 F

R = 0.6 F

There were 240 books altogether at first means:

R + F = 240

Replace R by 0.6 F in this equation

0.6 F + F = 240

1.6 F = 240

F = 240 / 1.6

F = 150

R = 0.6 • 150 = 90

There were150 Romance and 90 Fantasy at first.

Mark the number of books with x.

Since the number of books sold is the same, it will be:

( R - x ) / ( F - x ) = 5 / 4

( 90 - x ) / ( 150 - x ) = 5 / 9

Agsin cross multiply.

9 • ( 90 - x ) = 5 ( 150 - x )

810 - 9 x = 750 - 5 x

810 - 750 = - 5 x + 9 x

60 = 4 x

x = 60 / 4

x = 15

A total of 15 + 10 = 30 books were sold.

x = number of books sold