This can be done as follows (The DirectSearch package should be downloaded from http://www.maplesoft.com/applications/view.aspx?SID=101333

and installed in your Maple.).

M := (A, B, w1, w2, theta) -> DirectSearch:-GlobalSearch(abs(A*sin(w1*t)+B*sin(w2*t+theta)), {t = -infinity .. infinity}, maximize, solutions = 1);

M(3, -4, 5, 5, .6);

Matrix(1, 3, {(1, 1) = 2.27858404325318, (1, 2) = [t = -97.9911631025769], (1, 3) = 16})

M(-3, -4, 5, 6.1, .6);

Matrix(1, 3, {(1, 1) = 6.99760903598980, (1, 2) = [t = 279.294098572198], (1, 3) = 21})

M(1, -1, 4, Pi, .6);

Matrix(1, 3, {(1, 1) = 1.99949182535559, (1, 2) = [t = -178.683005013318], (1, 3) = 17})

It should be noted that the amplitude equals max(abs(A+B), abs(A-B)) if w1 <> r1*w2 or/and w2<>r2*w1, where r1, r2 are rational numbers. This is proved in the almost periodic funtion theory.