The switches will use the information in the Layer2 header to move the frame between the two hosts. The Layer2 header would include a Source MAC address of and a Destination MAC address of.
The Layer3 header would include a Source IP address of 10.0.0.11 (Host A) and a Destination IP address of 10.0.0.22 (Host B). The contents of the frame are irrelevant, it could be an ICMP (ping) packet, it could be an ARP packet, or it could be other data. It starts with Host A having a frame to deliver to Host B.
One of the most frequent requests I receive is asking how the process would be different if there were multiple switches. In a previous article we demonstrated how a single switch functions.