My question involves a traffic ticket from the state of: California
I was driving down Mission Blvd in Hayward, CA.precisely between Bst and A st.The weather condition was raining and wet ground at this time. A car came from the opposite direction (that is the city hall parking lot )and sped right in front of me but cut off at the light and went through the opposite dirction.
I put on my traffic signal to change to the left lane from the right and looked through the rear mirror and over my shoulders, the oncoming white car in that lane was at a good distance, he saw my traffic light and slowed , He signalled with a wave of hand for me to enter the lane while i moved to that lane. only for the cop who was 2 cars behind the white car to suddenly pull behind the cars up to whhere I was and pull me over.
He asked for my license, insurance and registration. without explaining what i did. i looked at him puzzeld and asked what I did. He states I made an unsafe lane change and made the other guy break. However the cop acknowledged he did see my traffic light .
why am I at fault? i dont understand. is it possible that it can be dismissed in court as not guilty or is a lawyer needed.?
( after thinking about what happened, I believe the policeman could not have seen when the driver slowed down and abrutly stopped and thought I was the cause of it,) pls tell me how to defend this ticket in court. Remember i was within the speed limit of 25miles per hr.

