Both of you are partially right and partially wrong.

HP is a product of Torque. In broad sense they are interchangeable simply because how HP is calculated. 

An engine output is primarily measured as torque, HP is just a measure of the amount of work done with those torque output.

Gearing plays a big role in how those engine forces are applied to the road as acceleration, and in the end, how much HP is being put to the wheels to accelerate 

A lower torque output engine spinning faster simply means that combination can get more work done in the same time frame, i.e. propelling the car to a higher speed.

For 2 given cars, with the same gearing, and the same body, i.e. Cd figures, the higher torque output car with have the upper hand in the lower gears, the multiplier advantage from the gears are the greatest. But the higher revving but lower torque output car will gain later on, as the higher rpm limit means each gear will last longer and, and that makes up for the torque deficit, in addition to the higher multiplier from the HP equation. 


--