Can I safely take power from one USB socket and data from another?
Provided they have the same ground, yes. A continuity tester will show you if the grounds are all connected together on the car side, but it would be prudent to connect them together in the Y connector you are making.

There are a few cases where grounds are deliberately at different levels where this will cause problems.