upper and lower limits for density function

I have been trying to figure out how to get the upper and lower limits to this problem? Would it be through u substitution?

Let X and Y be random variables. The density function of X is

f(x) = 24x^2, for 0<x<1/2,

0, otherwise

The conditional density of Y, given X=x, is

g(y) = y/(2x^2), for 0<y<2x,

0, otherwise

What is the form of the marginal density function of Y where it is nonzero?

The answer is, ky(1-y) for 0<y<1, but not exactly sure on how it was derived.

Thanks for the help.