It's been a 7-8 months since I worked with classic UI.
Here's is what I would suggest:
1. To Pathfield there would be listeners available, where on select of some path it will trigger. It can be dialogselect or change
2. On these events you can write function. Event will give you the value selected in path field
3. Now search for the smartImage using findByType and use setValue on it.
I dont have the exact code, but it should be fairly easy as classic UI is full of events/methods to manage these stuff.
https://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html