Hi, you need to do some changes,
you can do it in two ways
1. the easier way - Use a supernet for all the AP subnets
192.168.8.0/21 and assign the router int f0/1 IP = 192.168.8.1/21
And on all the hosts in the Switch B, set default gateway as 192.168.8.1
But this way it won't be secure and not a good solution.
2. Use different vlan for each of the ports on swtch B,
port 1- vlan 10, port 2- vlan20,port3-vlan30,port4-vlan40,port5-vlan50
and the port24 as trunk port.
On the router interface f0/1, create subinterfaces for each vlan.
f0/1.10 - vlan10 - ip 192.168.10.1/24
f0/1.20 - vlan10 - ip 192.168.20.1/24
and so on.
So, the host on 1st port using subnet 192.168.10.0/24 will use GW as 192.168.10.1 and so on.
Hope this helps.