We know if a car is travelling at constant speed up the hill then the power output of engine is equal to change in gravitational potential energy per unit time . (Assuming friction negligible). What confuses me is that when the car has reached top of slope it will have maximum Gravitational potential energy but will kinetic energy be 0 as energy needs to be conserved .
The car engine is converting the chemical energy in the fuel into mechanical energy. This means that although total energy is conserved the mechanical energy, i.e. the potential plus kinetic energy, is not conserved.