Actually, I think you don't even need iptables

If networking on node B is correctly set up then all you need to turn IP forwarding on on node B:
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
and add routes from A to C through B and vice versa on the networks A and C. Manpage for route should help you with this.