Needs["xAct`xCoba`"]

DefManifold[M,3,IndexRange[a,c]]

DefChart[sph,M,{1,2,3},{r[],θ[],ϕ[]},ChartColor->Blue]

We introduce another coordinate chart so we need to use DefChart instead of DefBasis:

DefChart[cart,M,{1,2,3},{x[],y[],z[]},ChartColor->Red]

Relation between both coordinate systems:

{x[]->r[] Sin[θ[]] Cos[ϕ[]],y[]->r[] Sin[θ[]] Sin[ϕ[]],z[]->r[] Cos[θ[]]}

Computation of the Jacobian matrix:

Map[PDsph[-a],%,{2}]

Map[ToBasis[sph],%,{2}]

ComponentArray@%

%/.Rule->ComponentValue

jacobianmatrix=ToValues@ComponentArray@Basis[-{a,sph},{b,cart}]

This is the correct BasisChange:

BasisChange->CTensor[jacobianmatrix,{-sph,cart}]

We declare it now using SetBasisChange. Take the spherical coordinates as the reference coordinate chart:

?SetBasisChange

This computes the inverse Jacobian matrix, the Jacobian (determinant of the Jacobian matrix) and the partial derivatives of the Jacobian matrix components:

SetBasisChange[CTensor[jacobianmatrix,{-sph,cart}],sph]

Metric tensor in spherical coordinates:

met=CTensor[{{1,0,0},{0,r[]^2,0},{0,0,r[]^2 Sin[θ[]]^2}},{-sph,-sph}]

Metric tensor in Cartesian coordinates:

ToCTensor[met,{-cart,-cart}]