We consider a problem of optimally controlling a two-dimensional diffusion process dx(t)(mu,beta) = mu(x(t))dt + beta(x(t))dB(t)(1): x(0) = x. dy(t) = alpha y(t)dt + (sigma root x(t) + gamma)y(t)dB(t)(2): y(0) = y. initially starting in the interior of a domain D(phi) = {(x, y) is an element of R(+)(2) : phi(x) < y < theta phi(x)} until it reaches the line y = theta phi(x) at a stopping time tau <= T(0), where T(0), alpha, sigma,gamma > 0 and theta > 1 are fixed positive constants and phi(x) is a given positive strictly increasing, twice continuously differentiable function on (0, infinity) such that phi(0) >= 0. The goal is to maximize the probability criterion sup((mu,beta)is an element of M(x)) P (y(tau) = theta phi(x(tau)(mu,beta)), tau <= T(0)vertical bar x(0) = x, y(0) = y). x,y is an element of D(phi). over a class of admissible controls M(x) consisting of bounded, Borel measurable functions. Under suitable conditions, it is shown that the maximal probability is given explicitly and the optimal process is determined explicitly by rho(phi(x),phi'(x),phi ''(x)) = mu(0)(x)phi'(x) - (alpha-1/2 (sigma root x + y)(2))phi(x)/beta(0)(x)(2) (C) 2010 Elsevier B.V. All rights reserved.