It will help to first look at a 2D analogue of this problem. Let the basis vectors be e1 = < 1, 0 > and e2 = < 0, 1 >. Let the other two basis vectors be U = < u1, u2 >and V = < v1, v2 >. Let the point a be with coordinates (a1,a2) and the coordinate of the new origin with respect to the old be p = (p1,p2).
Now you should draw a picture indicating the old origin, the new origin and the point a. Let A be the vector pointing at point a, i.e. A = <a1,a2>. Similarly let P be the vector for point p. Then you need to find how point a relates to point p. If you draw the picture, you'll immediately see that it must be the vector pointing from point p to point a. Call this vector A'. As it happens from the rules of vectors P + A' = A, so solving this, we get A' = A - P. That is, the vector pointing at point a, starting from point p, is A' = A - P = < a1 - p1, a2 - p2>. So far so good. Now we need to express A' in the basis vectors U andV.
We must find constants x and y such that:
This gives us a system of simultaneous linear equations in x and y:
Then I'm sure you can just solve them with either Gaussian elimination or by hand. (x,y) will be the coordinates of the point with respect to the new origin and basis vectors.
The 3D case is analogous. Here let a = (a1,a2,a3) and p = (p1,p2,p3) and the basis vectors are u,v and w. Then you need to solve
[LaTeX ERROR:
Convert failed]
This gives you the system:
