"how can the hp be the same but the torque different between two of the same engines?"
As DodgeMan said, it's just the tuning of the engine from the ECU (computer), or in our case, de-tuning of the engine. The main trick that's fooling you is that peak torque and peak HP happen at different rpms. At peak torque, 1600 rpm, your 2011 engine is deliberately governed, while at peak rpm, 3013 rpm, it is not. The 2012 is not governed in this way.
Our engines, the 2011s, are physically about the same as the 2012. Here's how the ECU can make torque different, but HP the same:
- up to about 1500 rpm, both engines have the same power and HP, both reaching 650 ft-lb of torque. Since the 2011 tranny is only specced for 650 ft-lb, the 2011 ECU will now begin delivering less fuel to the injectors as rpms grow to hold torque to 650. The 2012 is not limited, so will deliver more fuel, and more HP, and more torque than the 2011 as rpms grow.
- at 1600 rpm both engines are capable of something close to 800 ft-lb or torque, but the 2011 is governed and still flatlined at 650 ft-lb, while the 2012 is at peak torque of 800. The 2012 torque will begin dropping as rpm goes up. The 2011 torque does not drop as rpms increase, it will stay at 650.
- at 2800 rpm, the 2012's torque has dropped from its peak back down to 650 ft-lb. The two engines now perform exactly the same again, and will continue to do so as rpms increase. The 2011 is no longer governed or limited, since torque is falling below 650 naturally because of standard engineering principles.
- at 3013 rpm, both engines perform exactly the same and reach peak power, with 350HP. Power will now decrease as rpms go up, so don't do that.
See these torque/HP curves for both engines:
When you look at them, it's kind of a bummer that they didn't keep the same labels and scale. So just look at the right one, which is the 2012. Imagine that the 2011 is also on that graph, then the 2011 would look exactly the same...except the torque curve would look like a mountain with the summit sliced off horizontally at 650 ft-lb.