figsize[inches_] := inches(468/3.125);

Solving for prices in the Hotelling model

y[x1_,x2_,p1_,p2_] := (p2-p1+x2+x1)/2;

π1[x1_,x2_,p1_,p2_] := p1*y[x1,x2,p1,p2];
π2[x1_,x2_,p1_,p2_] := p2*(1-y[x1,x2,p1,p2]);

eq1 =
0== D[π1[x1,x2,p1,p2],p1]
eq2 =
0== D[π2[x1,x2,p1,p2],p2]

{psubs} = Solve[{eq1,eq2},{p1,p2}];
psubs

Solving for prices in the Hotelling-Smithies model

x1 = 1/6;
α = 0.8;β = 1;

Clear[π1];Clear[π2];
π1[x1_,x2_,p1_,p2_] := 
p1*
(Integrate[-α(p1+x1-x)+β,{x,0,x1}] +
Integrate[-α(p1+x-x1)+β,{x,x1,y[x1,x2,p1,p2]}]
);
π2[x1_,x2_,p1_,p2_] := 
p2*
(Integrate[-α(p1+x2-x)+β,{x,y[x1,x2,p1,p2],x2}] +
Integrate[-α(p1+x-x2)+β,{x,x2,1}]
);

p1data = {};
p2data = {};
π1data = {};
π2data = {};
Do[
x2 = x1+i*(1-x1)/100;
eq1 =
0== D[π1[x1,x2,p1,p2],p1];
eq2 =
0== D[π2[x1,x2,p1,p2],p2];
psub = Last[NSolve[{eq1,eq2},{p1,p2}]];
AppendTo[p1data,{x2,p1/.psub}];
AppendTo[p2data,{x2,p2/.psub}];
AppendTo[π1data,{x2,π1[x1,x2,p1/.psub,p2/.psub]}];
AppendTo[π2data,{x2,π2[x1,x2,p1/.psub,p2/.psub]}],
{i,0,100}
];

p1plot =
ListLinePlot[
p1data,
PlotStyle->{Blue,Thick}
];
p2plot = 
ListLinePlot[
p2data,
PlotStyle->{Red,Thick}
];
labels =
Graphics[
{Blue,Text[Style["(Subscript[p, 1])",Large],First[p1data],{1.5,0}],
Red,Text[Style["(Subscript[p, 2])",Large],First[p2data],{1.5,0}]
}
];
Show[
p1plot,p2plot,labels,
PlotRange->{{0,1},All},
AxesOrigin->{0,0},
AxesLabel->{"(Subscript[x, 2])","prices"},
BaseStyle->{FontSize->24},
ImageSize->figsize[5]
]

π1plot =
ListLinePlot[
π1data,
PlotStyle->Blue
];
π2plot = 
ListLinePlot[
π2data,
PlotStyle->Red
];
max = 
Reverse[
First[
Reverse[Sort[Transpose[RotateRight[Transpose[π2data]]]]]
]
];
labels =
Graphics[
{Blue,Text[Style["(Subscript[π, 1])",Large],First[π1data],{1.5,0}],
Red,Text[Style["(Subscript[π, 2])",Large],First[π2data],{1.5,0}],
Darker[Green],Line[{{max[[1]],0},max}]
}
];
Show[
π1plot,π2plot,labels,
PlotRange->{{0,1},All},
AxesOrigin->{0,0},
AxesLabel->{"(Subscript[x, 2])","profits"},
BaseStyle->{FontSize->24},
ImageSize->figsize[5]
]