Let A and X be nonempty, bounded and closed subsets of a geodesic metric space (E, d). The minimization (resp. maximization) problem denoted by min(A, X) (resp. max(A, X)) consists in finding (a(0), x(0)). A x X such that d(a(0), x(0)) = inf {d(a, x) : a. A, x. X} (resp. d(a(0), x(0)) = sup {d(a, x) : a. A, x. X}). We give generic results on the well-posedness of these problems in different geodesic spaces and under different conditions considering the set A fixed. Besides, we analyze the situations when one set or both sets are compact and prove some specific results for CAT(0) spaces. We also prove a variant of the Drop Theorem in Busemann convex geodesic spaces and apply it to obtain an optimization result for convex functions.