Bridge: Which transfer do you use with both majors - one 5 carder and another 4 carder
The most common answer to this problem is called Smolen, which applies when you have game-forcing values. In Smolen, you start with Stayman. If partner shows a 4-card major, proceed as normal with that suit as trumps. If partner denies a major, you bid your 4-card major at the three level. Opener now chooses a strain.

With less than game-forcing values, your choices really depend on what other bids mean in your system, but the following is usually workable:


With 5 spades, 4 hearts, and invitational values, bid Stayman and rebid 2S after opener's 2D.
With 5 hearts, 4 spades, and invitational values, transfer to hearts and rebid 2S after partner accepts the transfer.
With 5-4 and less than invitational values, consider using "Crawling Stayman." This is a rebid of 2H after 1NT-2C-2D, and it shows a weak hand with the majors. Opener passes or corrects.