Heat 1 tablespoon butter and 1 tablespoon olive oil in a skillet over medium low heat. Add diced onions, salt, pepper, thyme and 1 teaspoon rosemary and saute, until onions are soft and starting to brown, about 10 minutes.
Add brown sugar to the pan, stir, and cook another minute. Transfer onion mixture to a plate.
To the same skillet, add more butter and rosemary, and heat over medium heat. Swirl to coat the bottom of the skillet.
Spread one side of two slices of bread with a little bit of mayonnaise. Add both slices of bread to skillet, mayonnaise side down.
Top both slices of bread with a bit of each type of cheese. Once the cheese starts to melt, add a few spoonfuls of caramelized onions to one slice of bread.
Sandwich the two slices together and cook until the bottom slice of bread is golden brown and toasted, about 2-3 minutes. Carefully flip the sandwich to toast the other side, another 2-3 minutes. Lower heat and cook until cheese is fully melted, covering the pan with a lid if necessary.
Transfer sandwich to a plate and repeat steps 3 through 6 with the second sandwich.
Slices both sandwiches and enjoy!