In other words is David recieving the same worship as YHWH?
Well, to answer your first question, I think both prepositions are
functioning more or less the same way. As for the second question,
that's not quite as clear simply from the grammar. The people did
something, and they did it to both objects. I don't see where that needs
to imply anything more than that both received honor. The verb used here
is often translated "worship," but the meaning of our English word is
probably a bit too narrow. It refers first to the act of prostrating
before someone, which clearly was done before human rulers enough that
it didn't have to be an acknowledgement of divinity. But in any case,
the question is to be answered in the semantics of the verb, not the
force of the prepositions.