From the question it is given that,
On a shelf, books with green cover and that with brown cover are in the ratio 2:3
There are 18 books with green cover
So, let us assume the common factor of 2 and 3 be y.
Then, 2x = 18
X = 18/2
Divide both numerator and denominator by 2.
X = 9
Therefore, the number of books with brown cover is = 3x = 3 × 9