Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
You can't get 5W into 8 ohms from 12V, unless you use a speaker coupling transformer, or a bridged amplifier (two amplifiers). Maximum power into 8 ohms off 12V is only about 2W for a normal single ended amplifier.
Here is a simple design based around a common LF351 opamp that will drive a small loudspeaker. The transistors act as current boosters for the opamp. The transistors you mention would also work as any other small NPN, PNP pair
The DC gain is 100 with the 3.9nF cap rolling off the gain at higher frequencies. Depending on what your input level will be you may need to have a potentiometer on the input to attenuate high input levels.