The host portion of the IP addresses will be different.
Refer to curriculum topic: 3.3.2 When two devices are on the same local network, the network portion of their IP addresses will be the same and the host portion of their IP addresses will be different.
Two devices on the same network do not need the default gateway in order to communicate with one another. The default gateway is used when the destination IP address is on a different network.