They do need to be in the same subnet, and that will depend on the netmask. Typically, that is set to 255.255.255.0, which means that 192.168.0.x and 192.168.1.x are different subnets. So a router configured for 192.168.1.x would route anything destined for 192.168.0.x upstream to be resolved by the next level of the network.
But if you configured everyone's netmask (including the router's) to be 255.255.254.0, then 192.168.0.x and 192.168.1.x would be part of the same subnet.
If you have two adapters connected directly to each other with no router, then where the traffic goes will depend on what you have the gateway IP address set to.
When connecting an XEP directly to a PC, RP2 will find the MAC address (assuming the XEP is functioning properly), no matter what network address you have the PC's ethernet address configured to. But then to actually send data traffic between the two, the XEP needs to be configured for the same subnet.