Cisco Packet Tracer divided by two vlan configure RIP routing protocol and IP address, so that it can not access each other via a local area network, but you can access each
How to Configure Inter-VLAN Routing | SYSNETTECH Solutions
Configure Inter VLAN Routing on Cisco Router and Layer 3 Switches – TECHNIG