I think it's simpler just to directly look at the equation for kinetic energy: KE = 1/2mv^2. In other words, kinetic energy is directly proportional to the mass, and proportional to the square of the velocity. Also, let's assume that in both cases the car comes to a complete stop at the wall, or both cars come to a complete stop where they collide (a perfectly inelastic collision), so that all of that kinetic energy is essentially released as heat (i.e. the cars crush).
In the case of 2 cars hitting each other, if the cars both have equal mass X and are traveling at velocity Y, then the total kinetic energy dissipated in the collision is 2 * 1/2XY^2, but then of course for each car it's just 1/2XY^2.
In the case of a car hitting a wall but traveling twice as fast, the kinetic energy dissipated in the collision is 1/2X(2Y)^2, or 2XY^2 - so that's essentially 4 times what the car experienced in the head on collision (of course in the real world the wall would dissipate some of the heat, but in this "spherical cow" example I think it's OK to assume the vast majority of the crushing occurs in the car).