The lender owns the book, and it is within his rights to loan it to whoever he wants. That is legal. Making this illegal would end libraries.
The borrower is well within his rights to accept the book, and as the current owner he is even allowed to make a copy of the book (see the famous TIVO case). Making this illegal would end backups and format/time shifting.
When the borrower returns the book, he keeps the copy. Oh no! Surely he must now become a criminal? Nope. Possessing an unauthorized copy is also not illegal, despite what many copyright holders would like you to believe. Making this illegal would also criminalize a lot of legitimate format/time shifting, again see the famous TIVO case.
If the borrower were to loan his homemade copy to someone else THEN it would finally become illegal.
Nothing about AI changes any of this.