@CedricWestphal
This is not possible using numeric or formula questions as they only allow one response.
You could ask the students to combine the answers somehow. For example, what is the sum of a and b, the difference of a and b, or the product of a and b. You could also ask for the positive coefficient or the negative coefficient, but you cannot ask for both at the same time.
Complicating that approach is that Bézout's coefficients are not guaranteed to be unique, which is probably why you're asking for a way to check them. Neither formula nor numeric questions allow any kind of post-processing calculations. Either the student's response answers matches the predefined answer or it doesn't.
You can, however, provide multiple answers to numeric questions. If you decide that you want the larger number to m=12 and n=42 (gcd=6), then you could set answers of 3, 1, 4, 11, 18, ...
Unfortunately, that list is infinite unless you want to start looking at minimal pairs.
You have little control over randomization with formula questions and the ability to find the gcd isn't one of the built-in functions, which severely limits your ability to do anything. For Classic Quizzes, you can edit the random numbers through the developer tools in the browser before saving them, but you still don't get gcd() or multiple answers.
You might be able to create a question that gives one of the coefficients and asks for the other, but that would need to be numeric rather than formula. Then you could create a whole bunch of variations and put them into a question group (Classic Quizzes) or item bank (New Quizzes) and deliver some at random from the pool.
The way to get multiple answers is to use multiple fill in the blank questions, but then the answers are not treated as numbers, but as text. You could ask for a pair of answers, but there's no way to match them up. By that, I mean if a=-10 and b=3 is one solution and a=4 and b=-1 is another, then someone could put a=-10 and b=-1 and get full credit.
It may be easier to ask a multiple choice or multiple answer question: "Which of the following are Bézout's coefficients for 12 and 42?" and then give some possibilities. If using multiple-answers, I would add "Select all that apply" to the directions. That doesn't get at whether the student knows how to find them on their own, but does allow you to check and see whether they know what Bézout's coefficients are. I would create several of those and put then randomly select some of them.
We often have to rethink how we ask math questions in Canvas. I've had to ask a lot of questions as multiple choice or multiple answers in my calculus and differential equations classes because Canvas does not support the way I would like to ask them. We also cannot calculate values based off of random numbers in formula questions and use those calculated values in the question text (without editing the random numbers before they are generated). If I could do that, then I could generate Pythagorean triples and include 2 of the three in my trigonometry problems.
I've also done a lot of using Excel to generate valid questions and then using Respondus Exam to get them into Canvas. Or I can create my own questions and use the REST API to create the questions directly in Canvas. But none of those get around the inability to support multiple responses in numeric or formula questions.
If you go to the Canvas Ideas page and search for formula, you'll see lots of ideas for improvement. You can lend your support there, but I don't see Canvas doing anything (the multiple answers in a formula question idea has been there for almost 10 years). You'll also find other tricks or hacks people have suggested. Someone even mentioned checking answers against a formula, which is kind of what you're asking about as well as multiple answers.