How to create an IN pin for 5v - 5 pin spdt relay
You have an Opto-Isolated 2 Channel Relay Board

Look at the schematic and find the two IN pins for activating the optocoupler, followed by driving Q1 and Q2 (2 channels) resulting in  driving the relays.
The IN pins should be connected to output pins from the Arduino
The Q3 in the picture should be Q2.
The supply voltage (VCC) comes also from Arduino and if you have enough power they can be combined. This has already be done in your picture.
If you do not have enough power from the Arduino you should separate the VCC and have a separate supply for the relay driving transistors and relays.