Ok. Create the first profile and call it BT Connected (or whatever you want to call it) and specify the context as BLUETOOTH CONNECTED and set a variable that you will remember (I think mine is %BTConnected) to 1 in the entry task. Clear it or set to 0 in the exit. This will activate anytime Bluetooth is connected.
Now turning Bluetooth on and off is a bit trickier depending on how definite you want to be with it. Assuming you already have location profiles for home and work, in the exit task you can add a line to turn Bluetooth on, another to wait a minute or two and then one last line to turn Bluetooth off IF %BTConnected = 0. If it's 1, this last line gets skipped and Bluetooth remains on. In the entry tasks for home and work, you simply check to see if %BTConnect = 0 and if so turn off Bluetooth.
It's going to get more involved as you get into it but for now this will get you started....