Trajectories are used in many target tracking and other fusion-related applications. In this paper we consider the problem of modeling trajectories as Gaussian processes and learning such models from sets of observed trajectories. We demonstrate that the traditional approach to Gaussian process regression is not suitable when modeling a set of trajectories. Instead we introduce an approach to Gaussian process trajectory regression based on an alternative way of combing two Gaussian process (GP) trajectory models and inverse GP regression. The benefit of our approach is that it works well online and efficiently supports sophisticated trajectory model manipulations such as merging and splitting of trajectory models. Splitting and merging is very useful in spatio-temporal activity modeling and learning where trajectory models are considered discrete objects. The presented method and accompanying approximation algorithm have time and memory complexities comparable to state of the art of regular full and approximative GP regression, while havinga more flexible model suitable for modeling trajectories. The novelty of our approach is in the very flexible and accurate model, especially for trajectories, and the proposed approximative method based on solving the inverse problem of Gaussian process regression.