They both had turbochargers. With turbos you can have pretty much any power figure you can dream up, depending on boost pressure. There's no reason why a straight six with a pair of turbos can't have the same power as a straight four with a turbo. Set the boost to what you want and you have the power you want.
However, both had claimed 276hp by their manufacturers, because the Japanese manufacturers had an unwritten "Gentlemen's Agreement" not to enter a potentially expensive battle of horsepower, like the American car industry in the Muscle era (and the German car industry right now).
The reality was that the Lancer Evo 5 had nearer 300hp, and the Skyline GT-R nearer 330hp - and similar torque levels.
Something similar used to happen with TVRs. They were supplied with an intake resistor so that, from the factory, they complied with UK noise laws. This was usually removed at the very first shakedown service at 1,000 miles, and the car got all the noise and power it was designed to have...
Yes - 112mph.