Dalton's law is Pi = xiPtot, where xi is the mole fraction of component i in the gas phase.
Your other formula is Raoult's law for ideal mixtures, describing the composition of the vapour in equilibrium with a liquid mixture. In this case Pi = xiP°i, where P°i is the vapour pressure of pure liquid i, and xi is the mole fraction of i in the liquid phase.
The two are related by xi(g) = Pi/Ptot = xi(l)P°i/Σxi(l)P°i
It is pretty unobservant to say "sometimes I find this formula, sometimes that one". In each case, try to observe the context, what is the situation being described, and what the symbols mean (the same symbol may mean different things in different contexts).