If the misbehavior is due to taking pics/videos, then show them Pt no. 3(a). One small advice : Don't lose your temper at any point of time while dealing with RPF officer(s)!!
For more serious cases, you may:
1. Tweet/mail DRM/GM
2. Mail DG/RPF
3....
more... Tweet RPF INDIA
If none of these work, then you may directly tweet our Rail Minister.
Don't know how effective these steps would be, but hope they help you fight the unwanted situations.