As I've never tried exactly that (and more specifically, never worked with Spotify), I cannot give you exact steps. But I can outline how this should be possible using tasker:
On your "Server" device:
- Condition: State → BT Near (specify the BT MAC of the "Player" device)
- Task: Launch App (whatever "server component" is needed)
On your "Player" device:
- Condition: State → BT Near (specify the BT MAC of the "server device")
- Task:
- Launch App (the music player used to connect to the other device)
- Either one of the "Media Control" actions, or "Play Music" should start playing
Of course, this assumes that – once the devices are paired, which should happen automatically once they are in reach of each other if they had been paired before – the app on the player-device automatically selects the "server device" as source to play from. As most players on a re-start resume where they stopped before, this should be the case unless you've used a "different source" in between – which might be avoidable using a specific app for this task.
On the other hand, my Collection of Tasker Resources a.o. lists the Media Utilities, dealing with Tasker as well as with Spotify, and thus might prove helpful in the process. And in fact, you can find a comparable process e.g. described here – explaining how to make Tasker launch Spotify when you plug in your headphones, then raise the volume and play the last played track.
Also see: