How can I multiply square wave circuits?
Your picture makes it look like that you do not care for any signal edge synchronization at all. If that us indeed the case then the following circuit consisting of a single quad NAND gate shall do the trick for you. 



If you do care about edge synchronization and generation of no runt pulses at the time of the frequency shifts than much more work must be done. That could take on the form of a circuit that contains a batch of additional flip-flops or a generator circuit that uses a common source clock and dividers to generate desired frequencies shown.