We present closed-form solutions to some double optimal stopping problems with payoffs representing linear functions of the running maxima and minima of a geometric Brownian motion. It is shown that the optimal stopping times are th first times at which the underlying process reaches some lower or upper stochastic boundaries depending on the current values of its running maximum or minimum. The proof is based on the reduction of the original double optimal stopping problems to sequences of single optimal stopping problems for the resulting three-dimensional continuous Markov process. The latter problems are solved as the equivalent free-boundary problems by means of the smooth-fit and normal-reflection conditions for the value functions at the optimal stopping boundaries and the edges of the three-dimensional state space. We show that the optimal stopping boundaries are determined as the extremal solutions of the associated first-order nonlinear ordinary differential equations. The obtained results are related to the valuation of perpetual real double lookback options with floating sunk costs in the Black-Merton-Scholes model.