Whilst there is only one Thomas Flanagan birth registered in Liverpool or the surrounding area in 1842 there are two catholic baptisms at St Anthonys Liverpool for starters.
Thomas Flanagan born 28th March, 1842 baptised 17th April, 1842 Parents Andrew Flanagan and Lucy (Jones. Godparents James and Elizabeth Brady
Thomas Flanagan born 27th July, 1842 baptised 31st July, 1842 Parents Thomas Flanagan and Jane Welch. Godfather Walter Welch and Godmother Mary Hill.
I think your friend will have to get his marriage certificate to determine who his father was. Do you know who he married?
Regards,
Mo