Do you see the problem?
There is no problem.
We know from deep mines, deep oil wells, and deep boreholes that temperature inside the Earth initially increases very rapidly with increased depth, about 11°C/km (or 30°F/mile). The temperature at the Earth's core would be over 100000 °F rather than 10000 °F at this rate of increase. This initial high thermal gradient does not apply throughout the Earth. Below is one depiction of estimated temperatures inside the Earth.
Note that the temperature is 1650 °C (3000 °F) at about 485 km depth, or about 7.6% of the way to the center of the Earth. The diagram in the question is more or less correct -- except for the "Do you see the problem?" label. There is no problem. Rock is a rather lousy conductor of heat. The thousands of kilometers of rock that separate the Earth's core from its surface make for a very nice blanket. Rock is such a lousy conductor of heat that the very slow convection due to the elasto-plastic circulation of the solid mantle dominates over conduction.
So why is the temperature not evenly distributed inside earth? Shouldn't the hot elements interact with the colder ones and transfer heat between them?
Temperature inside the Earth is not evenly distributed because the Earth has not yet cooled down to an equilibrium state. When you take a pie out of the oven, the interior stays warm for a good amount of time while the crust cools fairly quickly. The Earth is somewhat like that pie, and it gets worse.
Even when the Earth formed it did not have a uniform temperature. The core became very hot as heavy elements such as iron and nickel sank to the center, pushing lighter constituents (i.e., rock) away from the center. This gravitational differentiation generated a huge amount of heat, concentrated in the core.
The crust cooled fairly quickly, in a geological sense of "fairly quickly". Zircons have been found in Australia that date to 200 million years after the formation of the Earth. The formation of zircons requires somewhat cool temperatures, and certainly not hot temperatures in the thousands of kelvins. Meanwhile, the core and mantle remained hot (and remain somewhat hot to this day) because of that primordial heat from the Earth's formation and from decay of radioactive elements in the Earth's mantle and crust.
The Earth's interior currently loses 44 to 47 terajoules of energy every second to space. At this slow pace, the Earth will not cool down for a long, long time. It will take another billion years or so before the Earth's core finally becomes completely solid.