1. Tell him you like to take pics of trains and its your hobby
2. Tell him you did not know that "Rail Photography is not allowed" and say "Sorry, I will not repeat this mistake again. Please let me go."
3. Go away from that location
4. After sometime, have a good look around and continue :-)