Sudafed is trade name for pseudoephedrine. If it contains pseudoephedrine, it will do the same thing as Sudafed.
Guiafenesin's therapeutic action is relatively unique. What it does is thin out mucous, any kind, anywhere. If your sinuses or middle ear are blocked by thick mucous congestion, guiafenesin will effectively "melt" that congestion and allow it to drain away through the eustachian tubes, eliminating the pressure. It's also used for chest congestion so that you can loosen up the gunk, cough it up and get rid of it. Most pill forms of guiafenesin are combined with pseudoephedrine; one gets rid of the gunk you already have, the other helps to keep more gunk from forming.
BTW: A pkg. of Sudafed or its equivalent won't last a long time if you have to buy it in a state with a methamphetamine problem. Pseudoephedrine is one of the key ingredients for meth cooking, so the quantity you can buy at one time is often very tightly restricted. Here, the limit is 3 boxes of 24 tablets, all blister-sealed. 24 tablets is 12 doses, which is only enough to last an adult 3 days.