Try this
In[1]:= Avector = {ax, ay}; Bvector = {bx, by}; Cvector = {cx, cy};
Bvectorprime = (Avector + Cvector)/2 + t*(Bvector - (Avector + Cvector)/2);
d = (Avector - Bvectorprime).(Cvector - Bvectorprime)/(Norm[
Avector - Bvectorprime]*Norm[Cvector - Bvectorprime]);
Sol 0, t]
Out[4]= {
{t -> -(Sqrt[ax^2 + ay^2 - 2 ax cx + cx^2 - 2 ay cy + cy^2])/(Sqrt[ax^2 + ay^2 - 4 ax bx + 4 bx^2 - 4 ay by +
4 by^2 + 2 ax cx - 4 bx cx + cx^2 + 2 ay cy - 4 by cy + cy^2])},
{t -> (Sqrt[ax^2 + ay^2 - 2 ax cx + cx^2 - 2 ay cy + cy^2])/(Sqrt[ax^2 + ay^2 - 4 axx + 4 bx^2 - 4 ay by +
4 by^2 + 2 ax cx - 4 bx cx + cx^2 + 2 ay cy - 4 by cy + cy^2])}}
Many symbols are have predefined meaning within Mathematica. For example C and ' <-Click each of those to read the documentation.