PCI Express system architecture permits peer-to-peer transactions... packets are routed through the switch based on their addresses so the only thing you would need to do is configure the devices to determine each others' address spaces. The switches take care of the rest.
Every PCI Express system needs one root device, which normally is the CPU and bridge of a computer. The easiest way to have two FPGAs to communicate with each other would be to have one FPGA configured as root, and one as endpoint, and attach their lanes, reset, and PCIE reference clock to each other.