?? あなたがすぐ帰ることは必要だ。
○ あなたが会員であることが必要だ。
Construction like 「(subject + verb) ことが必要だ」 is highly unnatural, except when the verb is copula だ/である. In addition, ~は必要だ makes all that comes before は into topic (i.e. background) so that effectively put the focus on 必要だ. It'd mean "It is NECESSARY (as opposed to optional, unrequired etc.)"
Likewise:
あなたがすぐ帰る必要はある。 It IS necessary that you go home immediately.
× あなたがすぐ帰る必要がある。 (it makes no sense with no emphasis)
あなたがすぐ帰る必要がある。 It is necessary that you GO HOME immediately.
あなたがすぐ帰る必要がある。 It is necessary for YOU to go home immediately. (note that the subject has changed)
あなたはすぐ帰る必要がある。 It is necessary for you to go home immediately.
As for the second pair, Japanese prefers leaving subject in first clause rather than in main clause:
A': あなたが進学するためには、150時間の勉強が必要だ。
B': あなたが進学するためには、150時間勉強する必要がある。
(modified wordings for naturalness)
Or you can change it into a single-clause sentence:
進学するために、あなたは150時間勉強する必要がある。
進学するために、あなたは150時間勉強しなければならない。