Explanation:
if I understand correctly, then we are mixing 7 cm³ of liquid A with 125 cm³ of liquid B to a liquid C.
A has a density of 1.42 g/cm³.
B has a density of x g/cm³.
the resulting C has a density of 1.05 g/cm³.
the first thing we see is the quantity of C :
C = A + B = 7 + 125 = 132 cm³
what "comes in" must also "come out" again.
there is no mentioning of a chemical reaction, that might cause a change of volume or mass of the mixture.
so, the whole is exactly the sum of its ingredients.
now about mass and density :
as also the mass (g) of the resulting C must be the same as the sum of the masses of A and B, we multiply the density by the quantity of every liquid to get the mass (g). and that is how we get then the missing density of B :
7×1.42 + 125x = 1.05×(7+125)
9.94 + 125x = 1.05×132 = 138.6
125x = 128.66
x = 1.02928 ≈ 1.03 g/cm³