its possible but you are cutting it fine....
i'm assuming both flights are international, correct????
if so then you get out of the airport by 9am, reach the taj around 1pm, spend a couple of hours there & start back by around 3pm & make it back to the airport around 7pm....if all goes well then its possible, however its not something i would personally risk....