мой вариант просто так)
var arr = [];
arr [0] = "1 + 2 =3";
arr [1] = "3* 2 =6";
arr [2] = "2+5 =7";
arr [3] = "1 +2=3";
function compareBySecond(a,b){
let number = n => Number(n.match(/(\d+)\s*\=\d+$/)[1]);
return number(a) - number(b);
}
function compareByAnswer(a,b){
let number = n => Number(n.match(/(\d+)$/)[1]);
return number(a) - number(b);
}
arr.sort(compareBySecond);
alert(arr);
arr.sort(compareByAnswer);
alert(arr);