I would like to start my university studies but I would like to start in Warsaw or Krakow only for 3 months then come back to my home country and finish the rest there.
That's probably going to work out only on a "test out" basis for first year required courses, especially something like mathematics. For example, if your program requires you to take pre-calculus, you could take an intensive pre-calc course in Poland and pass the AP exam or the qualification exam at your future university so that you can start studying calculus a year ahead of schedule. A student of mine did exactly this before he started school in the United States, and it helped him a lot.
When you study sciences or engineering, the thing that limits your progress the most is the level of your math. So being a year ahead of your peers in terms of math puts you on a whole different plane of existence and save you heaps of time and trouble.
It might also work for first-year physics and chemistry. But I don't think for very many other courses that don't have such clear criteria, even sciences like biology and geology. In any case, three months is not long enough to learn the material to pass the qualifying exam unless you have done it already and just need a refresher.
So if your math is pretty good and you can get your pre-calc solidly behind you before you transfer, go for it and treat those three months as a review period.
As for getting actual credit for the course, that's probably not going to happen, at least without your future university agreeing to it in advance. Contact them and see if there is anything that can be done. Without pre-approval, chances are next to zero, at least in the US.