The protagonist of the story is a taxi driver who picks up a girl. She asks him to bring her to Isezaki and then the author writes:
What kind of form is the one in bold?
願ったり is a part of the set phrase 願ったり叶ったり. Sometimes the latter half of this set phrase is omitted, and that doesn't change the meaning. The following だ is a copula, and と is a quotative particle which is not followed by a verb.
Thinking "that's exactly what I hoped", he picked her up and ran down the road at night.
The driver thought he was lucky maybe because he wanted to go to Isezaki anyway even without a customer.
These たり in 願ったり叶ったり are explained here. I think the phrase literally means "things like wishing and coming true." Well, since it's a set phrase it may be better to memorize it without thinking too much. There are a few set phrases that look similar: 似たり寄ったり / 踏んだり蹴ったり.
This 願ったり is a shortened form of the expression 願ったり叶ったり, which may translate, rather literally, to "You wished for it, and it has come true for you." The たり here is an auxiliary indicating a completed action.
The だ is the copula, and the と is the quotative particle.
The usage of 願ったり叶ったり is pretty much consistent with it's literal meaning; You may say this when your wishes, expressed or unexpressed, come true:"That's exactly what I wished/hoped for!" But, in a slight departure from the original, it can also be used when things are in accordance with your wishes/preferences without a prior act of actual wishing (whether expressedly or internally). You can say「願ったり(叶ったり)だ。」when situations, conditions, offers, etc. simply suit you very well.
In context, the 願ったりだ may signify a) that the specific situation, or some aspects of it, is what the driver has been wishing for, or b) that he's just a taxi driver who is happy to have found a customer.
a) Thinking, "That's what I've been wishing for!" he picked her up and drove through the night.
b) Thinking, "That's exactly what I want to do!/Suits me very well!" he picked her up and drove through the night.