Alright, lets get started.
Suppose number of books Jim have = x
Sam has twice as many books as Jim. So,
Number of books Sam have = 2x
If Sam gives 12 books to Jim, they will have the same number of books.
When Sam gives 12 books, his remaining books will be ![= 2x - 12](https://tex.z-dn.net/?f=%20%3D%202x%20-%2012%20)
When Jim gets 12 books from Sam, his books will be ![= x + 12](https://tex.z-dn.net/?f=%20%3D%20x%20%2B%2012%20)
And as per given question, they both now have equal books, so
![2x - 12 = x + 12](https://tex.z-dn.net/?f=%202x%20-%2012%20%3D%20x%20%2B%2012%20)
Adding 12 in both sides
![2x - 12 + 12 = x + 12 + 12](https://tex.z-dn.net/?f=%202x%20-%2012%20%2B%2012%20%3D%20x%20%2B%2012%20%2B%2012%20)
![2x = x + 24](https://tex.z-dn.net/?f=%202x%20%3D%20x%20%2B%2024%20)
Subtracting x from both sides
![2x - x = x + 24 - x](https://tex.z-dn.net/?f=%202x%20-%20x%20%3D%20x%20%2B%2024%20-%20x%20)
![x = 24](https://tex.z-dn.net/?f=%20x%20%3D%2024%20)
It means Jim has number of books = 24
So, Sam has numberof books = ![24 * 2 = 48](https://tex.z-dn.net/?f=%2024%20%2A%202%20%3D%2048%20)
So, they have number of books together =
: Answer
Hope it will help :)