let q1 be quotient of first division and q2 be the quotient of second division, d be the divisor and let original number be num.
the 2 equations formed are:
multiplying equation-1 by 2 and equating the equations gives us
shifting the d term on one side and numbers on the other
taking d common from the left side
so d can either be 51 or one of its factor(17 or 3).
since we have a reminder of 27 in one case d cannot be less than 27.
so divisor is 51.