Boil eggs using hourglasses
Python 2, 157 154 108 103 bytes

a,b,c=input()
t=c
while t%a:t+=b
print&quot;&quot;.join(&quot;aA&quot;[i%a*2:]+&quot;bB&quot;[i%b*2:]+&quot;s&quot;[i^t-c:]for i in range(t+1))

Try it online! or Check all test cases!
Input: from STDIN, 3 positive integers a,b,c representing the 2 hourglass times and the time needed for the egg to boil.
Output: print to STDOUT a string of commands following the specification.
Big idea
There exists positive integers \$x,y\$ such that:
$$ax-by=c$$
(Proof in the last section)
Thus, if we continuously flip both hourglasses, the time between when the second hourglass finishes \$y\$ flips and when the first hourglass finishes \$x\$ flips is exactly equal to the time needed to boil the egg.
Code overview
t keeps track of \$by+c\$. We increment \$y\$ until \$\frac{by+c}{a}\$ is an integer.
When a valid value of t is found, t will be the time needed to flip the first hourglass \$x\$ times, and also the time when the egg should be done. t-c is the time when the second hourglass finishes \$y\$ flips, and also the time when the egg should start to be boiled.
The command string is created by increasing the time i, and insert &quot;aA&quot; or &quot;bB&quot; every time \$a\$ or \$b\$ divides the current time. &quot;s&quot; is inserted when the time is t-c.
Proof of the existence of \$x\$ and \$y\$.
Since \$c\$ is a multiple of \$gcd(a,b)\$, Bézout's identity claims that there exists integers \$k_1, k_2\$ (which can be negative) such that:
$$k_1a-k_2b=c$$
Since \$ba - ab = 0\$, we can increase \$k_1\$ and \$k_2\$ by \$b\$ and \$a\$ without changing the result:
$$(k_1+b)a-(k_2+a)b=c$$
Thus, we can keep increasing \$k_1\$ and \$k_2\$ until they are both positive.