Whenever you want to determine the length of an object in a given Frame of Reference, the time coordinates must have the same value. You fulfilled this requirement in the first frame when you said t_{a1}=t_{a2}=0 but when you transform the two events at either end of the object into the second frame, the new time coordinates will not be equal, t_{b1}≠t_{b2}.
One way to find a pair of events that will meet the requirement when the first event is at the origin in both frames is to multiply the xcomponent of the second event in the first frame by the velocity (assuming c=1) and use that as the timecoordinate for the second event in the first frame. Now when you perform the Lorentz Transform on the two events, the time coordinates will be equal and you will get the correct contracted length.
If the first event is not at the origin, then you have to take the delta between the xcomponents and multiply that by the velocity and add that to the timecoordinate of the first event and use that as the timecoordinate of the second event.
So, in your example, let's make the added assumption that x_{a1}=0 which will put the first event at the origin. The we multiply x_{a2} by v to get vx_{a2} so the second event is [vx_{a2},x_{a2}].
When you transform the timecoordinate for this event you get t_{b2}=γ(vx_{a2}vx_{a2})=0, which is what you want, the t coordinate for the second transformed event equal to the first transformed event (which is at the origin).
When you transform the xcoordinate for this event you get x_{b2}=γ(x_{a2}vvx_{a2})=γ(x_{a2})(1v^{2}) and since γ=1/√(1v^{2}), this simplifies to x_{b2}=x√(1v^{2})=x/γ, which is what you want.
