Given the expression below

Let the unkown quantity be k cakes

To determine the unknown quantity k,
Crossmultiply

Hence, the unknown quantity, k, is 15 cakes.
Alternatively
If 3 cakes is shared among 25 people,
The ratio is

Let k cakes be shared among 125 people
The ratio of cakes to the people will be

Which both is equaivalent below

To determine the k cakes shared among 125 people, crossmultiply to eliminate the denominators

Since, k is the unknown quantity,
Hence, 15 cakes is the unknown quantity