HI
I'm just back from Dublin and we did both the gaol and the guinness factory. We bought the ticket for the sightseeing buses for about 15E each. You can hop on/hop off and use the tickets fro 24 hours as much as you want so they are great for getting around, they leave you right to the door of the gaol and the factory.
There are 3 slightly different routes, green, yellow and red buses, although the red and yellow ones can be used on the same ticket, and they all stop at the main attractions if requested
When I was looking into the tickets for the things we wanted to do, we could only buy a pass that entitled us to loads of things, so we just bought the guinness tickets online at a discount price, then paid at the door for the gaol (it was only 6E per head anyway). I don't think it is possible to buy a ticket just for these 2 attractions, or if it is we couldn't find it!