The books in a library were placed on 50 shelves with an equal number of books on each shelf. Then 5 shelves were removed and the books on these shelves were placed on the remaining 45 shelves. As a result, the number of books on each of the remaining shelf increased by 7. What was the number of books on each shelf at first?

Let x be the number of books on each shelf at first. Then the total number of books in the library is 50x. After removing 5 shelves, there are 45 shelves with (x+7) books on each shelf. So the total number of books in the library is also 45(x+7).

Since both expressions represent the same quantity, we can set them equal to each other and solve for x:

50x = 45(x+7)
50x = 45x + 315
5x = 315
x = 63

Therefore, there were 63 books on each shelf at first.

Let's solve this step-by-step.

Let's assume the number of books on each shelf at first is 'x'.

Initially, there are 50 shelves, so the total number of books in the library is 50x.

After removing 5 shelves, there are 45 shelves left. The books from the removed shelves are redistributed among the remaining shelves, increasing the number of books on each shelf by 7.

So, the new number of books on each shelf is (x + 7).

Since the total number of books in the library remains the same, we can write the equation:

50x = 45(x + 7)

Now we can solve this equation to find the value of 'x'.

First, distribute 45 to (x + 7):

50x = 45x + 315

Next, subtract 45x from both sides:

5x = 315

Finally, divide both sides by 5:

x = 63

Therefore, there were 63 books on each shelf at first.