Hooking up a Samsung TV to a Sony soundbar and subwoofer

Solution
Should work fine. Connect the TV optical audio output to the optical audio input on the Soundbar. Check the TV manual on how to use the output. You may have to turn it on, turn the TV speakers off and change the audio output type in the TV menu.