Connect each preposition with the case it "governs". In a prepositional phrase, the noun following the preposition has to be in a specific case. You have to memorize these cases!!