Hello necyil;
Pretty vague question, at this point; it would be helpful to know what S5 fanily these I/O modules belong to (S5-100U, S5-115U, S5-135-U...)and what rack and power supply you have presently for them.
You can notice from the first look that your S5 I/O modules do not fit in the S7-300 rack (rail + bus connector system). You have to look into a remote I/O configuration (Profibus-DP).
Supposing you have an expansion rack and power supply for the S5 I/O modules, you could probably use a IM308-C as a Profibus-DP slave in that rack, and configure the I/O points over Profibus.
Come back with more information, we'll try to give you more precise answers.
Hope this helps,
Daniel Chartier