one of the two h1b gets rejected. what are the options i have?

very URGENT!! Two companies A,B are filing H1B petitions for me this year. I want to join company A. I want to know whether i can directly join Company A if H1B petition applied by A gets rejected(a miss in lottery) and H1B applied by Company B gets accepted?

U can, but transfer/cap-exemption is needed after approval or stamping