Try this —
plot([.2 .2], [0 .35],'--k')
hold on
plot([.5 .5], [0 .35],'--k')
axis([0 1 0 .35]);
xticks([.2 .5])
Ax = gca;
Ax.XAxis.TickLabels = {'$x_m$','$x_2$'}; % Changed
Ax.XAxis.TickLabelInterpreter = 'latex'; % Added
xlabel('$x\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
ylabel('$y\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
.