After the Stayman rebid of 2D denying a four card major, a rebid by
responder of 3D is used to show either
1) a game-going or invitational hand with 5-5 in the majors
2) a game-going hand with 5 spades and 4 hearts
With a game-going hand with 5 hearts and 4 spades, responder bids 3H over the opening 1NT (hoping that opener bids 3S with 4 of them).
Opener then rebids with 3 spades either 3S with a minimum or 4S with a maximum. Without 3 spades, opener rebids 3H with a minimum or 3NT with a maximum. Over 3NT, if responder has the game-forcing
hand and 5-5 in the majors, responder may bid 4D to request opener to bid 4H.