Looking at your photos again........
Seems you have access to the lines (hot and cold) going to kitchen faucet.
Place your hand on the cold water line prior to where the kitchen faucet cold line connection on main cold water line.
Have someone turn o kitchen faucet cold water..........do you feel hot water flowing thru that cold water main line as it feeds the kitchen faucet?
If so......hot water is momentarily backfeeding from water heater into cold water line until cold water flow overcomes the hot water.
Then you would need to install a check valve in cold water outlet at water heater (so cold water can flow into water heater but not back out of water heater via cold inlet).
If you can not feel hot water in that section of main cold water line just prior to kitchen feed line then the hot/cold is happening inside your kitchen faucet.
IMO.......kitchen faucet