You may or may not have an impatiens that is perennial and will continue to live. If it is an annual impatiens it is likely to die after the season because it has finished its natural cycle. They are not that long-lived and may only last for a few months after summer. A perennial impatiens should survive for a while if you give it water, food, and sun. You might want to cut it back a little to encourage new growth, and fertilize it when you water with a dilute solution.
Geraniums are another matter completely.
On the other hand, there is a very large group of plants frequently called geraniums, which are really a type of Pelargonium. I suspect that one of these groups is what you have. They can be kept from year to year, and there are several ways to maintain them. If you plan on needing a lot of plants next year, lift the geraniums, remove the soil from the roots, cut the stems to about 4 inches, remove the leaves, and trim the roots back to about 2 inches. Plant the plants in sterile soil water, and label.