How to Connect 2 Routers, 1 Switch, 2PC's in CISCO Packet tracer
If you set the default Gateway on each PC to the IP address of the router interface they are connected to the PCs can talk to each other.
Your switch only needs an IP address for management purposes so don't let that confuse you. You won't be routing packets from one subnet to another via a switch for your task. That's the routers job.The switch just enables you to connect everything. You can do more advanced switching using VLANs and layer 3 switches but that's off topic here.