Path-integral quantization of the confined solution of a relativistic two-body problem