John:
It will be very difficult to identify where James Brennan was from in Ireland. The name Brennan was very common and in mid-19th century was found in every county with the most in Co. Kilkenny. See the link below to an Irish Times surname web site.
I checked Roots Ireland www.rootsireland.ie and they have 56 James Brennan baptisms from 1819-1823 ( 17 for 1821) Also, keep in mind that many RC churches do not have records back to 1821 and therefore baptisms from those parishes would not be included in Roots. You would need to have his parents names to try to determine where he might lived unless you can find a clue in American records.
http://www.irishtimes.com/ancestor/surname/
The same situation applies to the Gallaghers. I searched Roots for the years 1822-1828 for a Bridget Gallagher born to Patrick and Margaret and got no record. Gallagher is also a very common name but is most prominent in Donegal and Mayo and the counties bordering Donegal and Mayo.
Donegal in particular is difficult because few of their churches have records back to 1825. They all seem to start around 1850.
Let me know if you have questions.
Roger McDonnell