Find the largest no that divides 630 and 940 leaving reminders 6 and 4 respectively

630 = 2^4•3•13+6

940 = 2^3•3^2•13+4

so, your number is 2^3•3•13 = 312

630 = 2*312+6
940 = 3*312+4