Construction zone

I would like to ask a question about passing in a construction zone. The road is a four lane divided road through my town and the road merges into one lane where they are repaving. I was in the left lane with a vehicle in front of me and a another one behind me. As we were approaching the merging point a toyota car slowed to allow us into the right lane. I'm not sure why, but the vehicle in front of me stopped instead of merging. The person in the toyota got tired of waiting and went on her way. The next vehicle was a garbage truck, he flashed his lights and waved the person to go. With plenty of room to proceed, the car in front of me started to move up and went about twenty feet then hit the brakes again. I also started and then stopped. The garbage truck was still waiting for the first car to go but he didn't, so I pulled out into the far side of the right lane and went. The car behind me also passed him and merged. The first car never moved. Did I pass the car illegally? What are the rules for passing a car at a merging point in a construction zone?
 
Top