Hi Khalil
Both sentences are grammatically correct, but the intended meaning is slightly different.
"Books for beginner to read" suggests that the books are intended for beginners, and the sentence is telling the beginners what they should read.
"Books to read for beginner" suggests that the sentence is telling someone what books they should read in order to become a beginner (which does not make sense).
Therefore, if you want to suggest books for beginners to read, the correct sentence would be "Books for beginners to read."