This is a topic-comment structure. It inverts the normal SVO order, brings the object to the front, and comments on it.
我这儿的书 These books here (topic)
可以借多长时间 Can be borrowed for how long (comment)
How long can I borrow these books for? OR
For how long can I borrow these books?
The other two sentences concern the use of the location marker 在.
在 + location can come before the verb, or it can come after, depending on the relationship between the location and the verb.
在 + location + verb means the verb takes place at the location.
在學校上課 to attend class at school - action of attending class takes place at school.
在家裏吃飯 to eat at home - action of eating a meal takes place at home.
Also the example you provided:
在办公室工作 to work at the office - action of working takes place at the office.
verb + 在 + location indicates that the object of the verb ends up at the location
（把郵票）貼在信封上 to stick a stamp on an envelope
（把書）放在桌子上 to put the book on the desk
I am not sure if you are familiar with the BA (把) - construction, but this usage of 在 easily lends itself to this kind of structure. Please google "BA-construction" if you need to.
Regarding your example sentences, both are correct, but the emphases are slightly different.
他在一个漂亮的房子里住。 You think of 住 as an action, whereas
他住在一个漂亮的房子里 sounds more like just a statement of fact, a picture of where he lives.
我想在后面坐 sounds more deliberate to me. I want to seek out a place at the back to sit down, whereas
我想坐在后面 simply describe the location you want to end up in.
Very subtle difference, and they are both correct.
But there are many instances where only one is correct.