Yes you can. Here's a way to visualize the reason behind this being the case:
Say you have 2 rings surrounding two seperate machines. Could you connect the two machines using a wire? Of course you could. Since you have access to 3 dimensions and not just 2, the rings don't actually pose much of a problem at all. The machines are enclosed with 2 dimensional shapes (circles), you have access to 3 dimensions of space.
Now in your situation it's essentially identical except instead of the machines being enclosed by 2 dimensional shapes they're enclosed by 3 dimensional shapes (spheres). But since you have access to 4 dimensions they don't actually pose any problem.
If you were a 2 dimensional creature living in a flat world unaware that space was actually 3 dimensional and I told you to connect the two machines with wire without going through the circles you'd probably think it was impossible at first thought. But only because you wouldn't be aware of what I would be. You wouldn't be able to look at the flat world from above.