If I am right, you want to transform the differential expression d2ϕdr2+2rdϕdr, where ϕ(r)=m(r)r, by changing the independent variable to V. The relation between V and r is V=4π3r3. We can think of m(r) as the result of composing two functions: one that yields V in terms of r and then one that yields m in terms of V. In other words, an abusing a bit of the notation, m(r)=m(V(r)).
We can then transform the given differential expression as follows:
var("r,V")
vol = 4*pi*r^3/3
m(V) = function("m")(V) # m as function of V
M = m(V.subs(V=vol)) # this is m(r)=m(V(r))
phi = M/r
divG = (diff(phi,r,2) + 2/r*diff(phi,r))
divG = divG.subs(vol==V, r^3==3*V/(4*pi)).full_simplify()
show(divG)
In a Jupyter notebook, one gets
12πV∂2(∂V)2m(V)+8π∂∂Vm(V)
that is, in a more proper mathematical notation,
4π(3Vd2mdV2(V)+2dmdV(V))
I hope this has some meaning for you.