Yes, this can be done...but I wouldn't want the potential headache from
trying to do it.
Sound cards can be very testy devices. Generally, they have certain
resources they want and, if they don't get them, they refuse to do what you
want...like a stubborn 4-year old. Putting two of them in the same system
is like putting two 4-year olds in the same room...they may play nice, or
there may be a lot of fighting, crying a whining.
If your goal is just to hook up a set of speakers and a set of headphones, I
would just go the easy route --
1) Get a set of speakers with a built-in headphone jack. These usually
disable the speakers when the headphones are plugged in.
2) Get a "Y" adapter that will allow you to plug both devices into the same
sound card.
or,
3) Get a more expensive sound card with multiple outputs on it.