James bought a packet of flour to make cakes. He used an equal amount of flour for each cake. After he had used the flour to make 3 cakes, 3/4 of the packet of flour was left. He went on to bake another 5 cakes and had 1400 g of the flour left. How much flour was used for each cake?