Reticular and hydration enthalpies can be used to calculate enthalpy of reaction:
Mg(OH)2(s) ---H2O---> Mg2+ (aq) + 2 OH-(aq) + ΔH
But....
Reaction constant depends also on its enthropy, which is unknown.
And - when someone thinks about acid-basic properties, usually it is reffered to liquid (aqueous) not solid compounds.
Determining which (Mg(OH)2 or Ba(OH)2) is stronger base can be very inaccurate !