The wall temperature determines t$_w$ due to heat transfer between wall and the air close to it.
The boundary temperature t$_b$ is simply the temperature of air outside and at the outer limit of the boundary layer. So much is obvious.
In between, friction will heat up the air, and the steeper the speed gradient is, the more friction heat will be set free. This means that the boundary temperature will increase only slowly as one moves into the boundary layer from the outside. Closer to the wall frictional heating will increase and have its peak close to the wall, where cooling from contact to the wall is still small. Directly at the wall this cooling effect from contact with the wall will become dominant, so there is again a steep drop in air temperature.
Only when the wall has been heated up by the boundary layer such that there is no cooling effect, the temperature profile in the bottom graph will occur. This is the case for a surface of little heat capacity and an equilibrium condition with no more heat transfer between air and wall.