(* the original expression *)
v=((-(((x-xp))^2))/(4(t-tp)))-(1/4)((s^2)/((st^2)tp))(((xp-m))^2)

Expand[v]

Extract the coefficients of each power of xprime
This writes the exponent as
-a (((x'))^2)+bTilde x'+cTilde

a=Coefficient[Expand[v],(xp^2)]
bTilde=Coefficient[Expand[v],xp]
cTilde=Expand[v]-bTilde xp-a (xp^2)//Simplify

Next write the exponent as 
a ((((x'))^2)+(bTilde/a)x')+cTilde

(bTilde/a)

a((xp^2)+(bTilde/a)xp)+cTilde-v//Simplify (* we have everythign correct *)

To write this as 
a((( x' + (bTilde/(2 a))))^2)
we need to subtract
((bTilde^2)/(4a))from cTilde

c=-((bTilde^2)/(4 a))+cTilde//Simplify

a(((xp+(bTilde/(2 a))))^2)+c-v//Simplify