This is an energy problem. Since the hill is frictionless, no energy is lost to friction, so the initial energy is equal to the final energy. Initially, they are at rest, so there is no kinetic energy; it is all potential. Potential energy = mgh, and Kinetic = .5mv^2. Since the potential energy in the beginning is all converted to kinetic energy at the end, you can say that mgh = .5mv^2. The m cancels out to give gh = .5v^2. So the height h = (.5v^2)/g.