When two containers at different T and P are kept together, will pressure become same or temperature? Two containers, kept at different temperatures are connected through a stopcock and two different ideal gases at different pressures are filled inside them. Initially the stopcock is closed. When the stopcock is opened, will the pressures become same or will thermal equilibrium be established first? Why?

Here's an extract from an online source about thermal equilibrium-"As we have seen in the zeroth law of thermodynamics, when two objects are placed in contact heat (energy) is transferred from one to the other until they reach the same temperature (are in thermal equilibrium). When the objects are at the same temperature there is no heat transfer."

We are taught in class that after the stopcock is opened, gaseous molecules travel from container at higher pressure to the container with lower pressure. There wasn't any discussion on thermal equilibrium. If the temperature of two gases kept at different temperatures don't become equal, isn't that a violation of zeroth law? 

When the stopcock is opened, the gas molecules at different temperatures do come in contact. So, why thermal equilibrium is not established and instead there is a greater driving force to make pressure in both the containers same?
The situation that is being covered in your class is where the two containers are thermally insulated from one another.  In this case, the only place where heat can be transferred from one container to the other is through the gas in the valve (by conduction).  But the assumption is being made in your class problem that heat conduction through the gas in the valve is negligible.  In any event, even if the valve were left open until the pressures effectively equilibrated, the temperatures in the two containers would require a much larger time to equilibrate.  So, if the assumption is made that, once the pressures effectively equilibrate, the valve is closed again (and does not allow heat transfer between the containers), then at final thermodynamic equilibrium, the temperatures of the gas in the two containers will be different.