Personally, I don't like the use of "por" to talk about a period of time, because the dictionary doesn't list that meaning of the preposition; I think it is a calque from English, but people are using it without any worries, and they're even including this usage in language courses, so yes, it seems your sentences are correct.
A more straight way to say that in Spanish (remember that subjects for us are usually more important than actions happening to them) could be:
- (No) me dan mis libros hasta dentro de unas semanas.
- (No) me entregan mis libros hasta dentro de unas semanas.