Finding Bertrand equilibrium with no demand function explicitly given
This is not a Bertrand equilibrium. Altough both firms set prices and they do so simultaneously, the products are not perfect substitutes because the travel distance differs for most consumers.

What this seems to be is the second stage of a Hotelling model. The usual assumptions are that a continuum of buyers are spread out uniformly along the line and that every buyer's reservation price is very high compared to the transportation cost, so in equilibrium all buyers will be served. The total quantity of buyers may be scaled to one for simplicity.

Given these assumptions you can derive the demand function each firm faces.