The achievement is easiest as Austria. Bohemia starts without an heir, and if one secures a royal marriage then the von Habsburgs might take over in Bohemia, which will make it possible to claim the throne. Declare a war the next month and force the union in the peace deal. The player will have to take the stability reduction of attacking a nation with a royal marriage. Alternatively one can wait until Austria gets missions for the Hungarian throne.