差し入れ is a noun (originates from a verb), often referring to food/drink brought to someone who is working (not normally a book) 差し入れで持ってきました。 = brought it as 差し入れ
It is the same ~ばいい as "I hope", or "it would be nice if", or something along these lines.
~たり is a common verb form which is used to list verbs non-exhaustively (i.e. "and other similar things", at least here - there are other uses). The last use of たり in a sentence is normally followed by する (which can be conjugated). It is the past tense + り, and as you can see from here, だった→だったり is also possible.