I have two transformers with a 220V primary and 12V secondary winding. What will happen if I apply 220V to the primary of the first transformer and connect the two secondary windings together? Will the second transformer's primary winding give 220 volts again?
You are describing the series connection of two transformers.
_Figure 1. Series connection of a step-down and step-up transformer.
In the "ideal" case you will get 220 V again. In practice there will be some losses and you can expect to lose some voltage (and power) in each transformer. If you're testing it out note that the open-circuit voltage may look quite good but it droops as you load up the transformer.
The output VA (power) will be equal to the lowest VA of the combination. If XFMR1 is 50 VA and XFMR2 is 100 VA you can only get less than 50 VA out of XFMR2 otherwise you will overload XFMR1.