I am solving the following equation for 2 variables.
Solve[{2*x1* y1 + 2*k*x3*y3 + (Sqrt[2 + q])*x1 == m1,
2*x1*y3 - 2*x3*y1 - (Sqrt[2 + q])*x3 == m2}, {x1, x3}]
The output od the code is {{x1 -> 18/61, x3 -> -(15/61)}} How can I save these outputs in 2 separate variables.
First of all, you have given the output for specific values of other variables, which you have not shown us. Evidentally, the way you are coding introduces some loss of transparency. You might better proceed with something like this:
Second, WL supports multiple assignment by unpacking, so if you really mean to save your two solutions as they are you can just unpack them. E.g.,
In general, there is really no need to do this. In fact, since these are two pieces of a single solution, in general will not make sense to separate them. However, it can be useful to get your hands on the actual values:
Naturally, you could store this list of values in a variable, but that is seldom needed. Finally, if you really insist on introducing variables solely for the purpose of storing these two separate values -- which will almost always create unwanted clutter -- you can again unpack them: