From the definition of γ, we know it is defined as change in volume per volume per unit temperature difference.
So, γ=V1(t2−t1)V2−V1
Or V2=V1[1+γ(t2−t1)]
Now, density = mass/ volume, So, replacing V1 with d1M and V2 with d2M we have, d2=[1+γ(t2−t1)]d1