The scenario that shows an object gaining potential energy and losing kinetic energy is:
roller-coaster car slowing as it moves up a hill.
In this scenario, as the roller-coaster car ascends the hill, it slows down (losing kinetic energy) while its height increases, resulting in a gain of potential energy.