It's a version of the Hotelling model (product differentiation).
One firm is located at the beginning of a line between 0 to 3, one at the end of the line (so one at 0, one at 3). There are $b/2$ consumers at 0, and $b/2$ at 3. Over the interval [1,2] there are $1-b$. Linear transport costs = λ per unit of distance travelled.
Utility for consumer from buying from firm 1 is $U(x_1) = v - λx - p_1$ (change x for 1-x for firm 2). The indifference condition is $U(x_1)=U(x_2)$. What are the demand functions for each firm?
My answer: $D_1(p_1,p_2) = 1/2 + (p_2-p_1)/2λ + (b/2)*p_1$
Is this correct? I don't know how to factor in the fact that there are $b/2$ consumers at either end.