the UCA222 is a poor soundcard, but it should work for you. My best recommendation is to get a better soundcard when you can afford it. you can still use the mixer without the UCA222.
I'm not following what you mean by connecting the 1/4 cables to LINE IN channel nor am I understanding what you mean by connecting the "ground cable" to the speaker.
first you need to get the UCA222 working with your computer before connecting anything to the mixer. have you downloaded and installed the ASIO drivers for the UCA222? if not, do that first. you can find them on the behringer website.
then you need to set up sonar to use the UCA222 ASIO drivers. you didn't mention which version you have, I'll assume X1 or above. other versions will have different ways of setting up the soundcard.
in X1, press the "P" on your keyboard. that will bring up the preferences window. now click on PLAYBACK AND RECORDING then for DRIVER MODE, choose ASIO. Click APPLY
now click on DRIVER SETTINGS and verify that the UCA222 is listed in both the PLAYBACK and RECORDING DEVICE(s)
if this part isn't working, don't worry about setting up the mixer yet, come back and report on what is happening. and also include which version of sonar, which operating system, what kind of speakers you're using and anything else you are working with.
-----------------------------------------------------------------------------------
after you've gotten the UCA222 soundcard set up correctly, you can set up your mixer for inputs and outputs. Thanks to RobertB, I have a tutorial on setting up a behringer 802 on my website. the 802 is similar enough to the 502, just with fewer inputs.
http://homerecording.beaglesound.com/cake/cake_tips5.html