Hey thank you very much, that worked like a charm, this is what I did:

VECTOR temp;

vec_set(temp, photo_1.x);
vec_sub(temp,reference_point.x);
vec_to_angle(photo_1.pan, temp);

and that's it, works perfect, now the only thing left is the tilt, I don't really know how to do it, maybe some trigonometry calculation for it? I'm not good a trigonometry, and I found a few examples on trigonometry but not applied to game development.

Again thanks, awesome community the one that A7 has.:)