Peculiar Question Irregular semi-tone of scale.

Hi folks, am hoping to achieve a formula
or function that can be applied to the general following problem - any feedback appreciated ;

Given two values that are known ;

(A) Fundamental = 1.07
(B) Some note = 1.4437

Where both (A) and (B) are the rational numeric values representing two musical intervals
occurring within the same 7 note musical scale. In many cases where (A) and or (B) do not
represent standard values of known musical intervals the only way both values may occur
in a musical scale is to modify the values of the semitone and whole tone.

For example, if the standard values of the semitone and whole tone are applied to the production
of a scale based on the given fundamental (A) ; 1.07 we can see that the value for (B) does not appear
precisely on either a major or minor scale only an approximation.

Where standard values are used ;
semitone = 1.059....
wholetone = 1.125 ....

Given input numbers, return the major_scale and minor_scale arrays.
This is done according to the rules:
MAJOR SCALE W-W-H-W-W-W-H
MINOR SCALE W-H-W-W-H-W-W

major_semitones = [0, 2, 4, 5, 7, 9, 11] # Cummulating sum of W-W-H-W-W-W-H
minor_semitones = [0, 2, 3, 5, 7, 8, 10] # Cummulating sum of W-H-W-W-H-W-W

Scales based on standard semitone, wholetone values fail to return the proper value of
(B) ;

MAJOR MUSICAL SCALE FOR ( C# ) IS ;
C# Eb F F# Ab Bb C
1.0700 1.2010 1.3481 1.4283 1.6032 1.7995 1.0099

MINOR MUSICAL SCALE FOR ( C# ) IS ;
C# Eb E F# Ab A B#
1.0700 1.2010 1.2725 1.4283 1.6032 1.6985 1.9065

THE QUESTION IS ; How can modified values for non-standard semitone and whole tone
be derived that provide the "best fit" for (A) and (B) to occur within the same scale?

In this example the correct modified values for irregular semitone and whole tone values
which produce a music scale where both (A) and (B) occur are ;

WHL TONE = 1.127844
SMI TONE = 1.062

The resulting scale yields (B) at the position of the tritone ;

W 1.07
W 1.20679308
H 1.361074335
W 1.445460943
W 1.630254452
W 1.838672702
H 1.036867988

But how can we derive via a standard formula ;

WHL TONE = 1.127844
SMI TONE = 1.062

When only given (A) and (B) ?