I reinstalled Windows XP, but audio driver not installed properly and it cannot work, how to solve this problem?

Check Master Volume control.
Check Windows Audio Service is started.
Check Device Manager for bad drivers.
Check audio mixer software (if installed) for a setting that mutes back panel audio if you have plugged headphones into a front panel audio jack.
…..Uncheck this setting to allow audio to both the back and front.
Check BIOS to insure on-board sound is enabled.
Install the correct Chipset and Audio drivers.

The Universal Audio Architecture (UAA) High Definition Audio driver for Windows may be corrupted or causing problems with the audio driver installation.
To resolve this, try the following:
1. Click Start > Control Panel > Add/Remove Programs.
2. Look for the following two items: Realtek High Definition Audio Driver and High Definition Audio driver Package – KB888111.
3. If these items are listed in Add/Remove programs, remove them.
4. Restart Windows.
5. Download the latest audio driver for your PC.
6. Double-click the filename to extract the files.
7. Go to the folder where the files have been extracted and browse to the \HDAQFE\xpsp2\us\ folder or the \MSHDQFE\Win2K_XP\us\ folder. (The name of this folder depends on your PC model.)
8. Double-click the file kb888111xpsp2.exe to install the High Definition Audio Driver Package.
9. Restart Windows.
10. Install the audio driver.

If you have tried all of these, and there is no audio mixer, no sound icon in the bottom right hand of screen, Bios has onboard audio set to enabled, and if you try to install the proper audio driver from the cd that came with my mobo it says failed to install driver.Try it like this:
Uninstall the Realtek folder,
Download the 2 drivers in the audio section.
Install the Bus driver,
Restart Windows,
Install the audio driver.
If the above method still could not solve the problem, try this.

The Realtek drivers have been stubborn lately and different things are working for different systems. This is one, nearly the same as above but slightly different.

1) Uninstall the Realtek software through Add/Remove Programs (if it’s installed but not working)
2) In Device Manager, remove the high definition audio device under Sound, video & game controllers.
Now for the part that had me stuck:
3a) Still in Device Manager, double-click Legacy Audio Drivers
3b) Click on the Properties tab
3c) Select any sound device listed here and click the Remove button
4) Restart Windows and retry the installation.

In the Device Manager under System devices uninstalled the Microsoft UAA Bus Driver for High Definition Audio. Remove the Unknown device under the Sound, video and game controllers, and then you will be able to install the Realtek drivers

May be what you really need and the problem everyone is having with Realtek. Even though the Realtek folders are being removed by Add / Remove the Registry Entry is not. This is how to remove it.
Messing with the Registry is serious stuff. Follow these steps exactly AND make a restore point before editing.
1. Click Start, click Run, type regedit in the Open box, and then click OK.
2. Locate and then click the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\KB888111
3. On the Edit menu, click Delete.
4. Click Yes, and then exit Registry Editor.

Now try installing the driver, either from CD or a download.

Removing the UAA bus.(MyComputer->Hardware->Device manager->System devices) And then installing the realtek drivers. When installing realtek it will install UAA that is needed for the drivers.