I am using Android x86 8.1 rc-2 in my PC. The problem is that WiFi is not working on it. I had even used Android x86 7.1 rc-2 in my PC and WiFi was working on that. How can I copy wifi kernel from that iso to new one
This is not possible. The kernel modules are linked to the running kernel. This it at all a bad idea.
Maybe it is only the firmware which the kernel module is using (dmesg). There you should compare the relevant kernel boot log. When you found which firmware file is loaded (and they have different versions) you can try to copy them over.
I know it's a bit of a late answer, but if you're using a broadcom adapter for wifi, if you load the driver early it will work (don't know about other type, but you could test). Just add
EXTMOD=b43 to the kernel boot loading options.
Note this does not help you swap the kernel, kernel modules or firmware. You can still copy the firmware from the system.img if you wanted to. It's located at /lib/firmware/b43 and /lib/firmware/b43legacy. But for the 7.1 and 8.1 versions of Android x86 it is the same, so this is just FYI. Kernel modules wouldn't even work if you copied them over, nor will it ever boot with a swapped kernel.