This message was posted on behalf of Intel Corporation
There aren't any official examples of how to achieve this, however, it is indeed possible but you will have to add some modules to the Raspberry Pi 2 to make it possible. I assume you are using the Raspberry Pi 2 Model B, according to the official website of this board (https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) the board doesn't have a lot of communication interfaces but they can be added through external modules. Meanwhile, Galileo does include a few communication interfaces such as UART, I2C, SPI, etc. If you would like to connect them and make then work side by side, your best option is to adapt the Raspberry to be able to communicate through one of these interfaces. I would personally choose UART since it is the simplest to use, however, it is also the slowest. So, you will have to choose which of these interfaces suits your project best and them you will have to adapt both board so they can communicate.
Let me know if I made myself clear enough, in case you have any other doubts, I'll be glad to help you.