Clear[r,theta,phi,x,y,z]
x[r_,t_,p_]:=r Cos[t] Sin[p] y[r_,t_,p_]:=r Sin[t] Sin[p] z[r_,t_,p_]:=r Cos[p]
x[r,theta,phi] y[r,theta,phi] z[r,theta,phi]
Clear[a,b,c] {a,b,c}=Simplify[scalefactors[x,y,z][r,theta,phi]]
Up to Examples