Phrases in sentences are not ordered by their type; you don't order prepositional phrases, noun phrases, etc. Instead, you order them by their function within the sentence: subject, verb, object, complement, adjunct etc.
Prepositional phrases will normally be an adverb or an adjective within a sentence.
If the prepositional phrase is (a part of) the pre- or postmodifier of another phrase, it is an adjective and you do not have to worry about its position in the sentence since it will always be within the phrase in which it acts as a pre- or postmodifier:
I gave him the book with the red cover while you were out of town.
You can't move with the red cover without taking the book with it, because it is a part of it (a postmodifier). The entire phrase in italics is the direct object which is normally placed immediately after the verb followed by the indirect object. In this case the indirect object is placed before the direct object because it is a pronoun. Had it been a noun phrase, it would be placed after the direct object:
I gave the book to my dad.
Prepositional phrases can also be adverbs. You can find a list of different examples of prepositional phrases functioning as either an adjective or an adverb here. In this case they will either function as an adjunct or a complement in the phrase (have a look at the answer to this question for an explanation of the difference between adjuncts and complements):
I gave him the book after you left.
In the above sentence, after you left is an adjunct, which can easily be omitted from the sentence without making it ungrammatical. Complements cannot be omitted so easily, they are "required" by the verb. For example, the verb go requires a locational complements, since you always go somewhere.
In your sentence, both prepositional phrases are complements. The construction take someone always requires at least one locational complement since you always take someone (to) somewhere. In this case, both with you and to Japan function as that type of complement. You can omit one of the two and still have a perfectly plausible sentence, but remove both and your sentence will make no sense or have a different meaning:
Complements normally immediately follow the verb. They stick to the SVC sentence structure (Subject-Verb-Complement): first the Direct Object, then the Indirect Object unless it is pronominalised (in that case it precedes the Direct Object), and finally the adverbial complements.
Let's return to adjuncts for a second. There exists a sort of guideline for positioning adjuncts within a sentence. They can often be given many different positions within a clause; there is a good article about adverb positioning on the Cambridge Dictionary website that will explain this more thoroughly.
The adjuncts of manner, place and time will often come in end position (after the complements), and when you have more than just a single one of those three, this can cause confusion as to which one should come last in the sentence and which one should come second to last etc. In this case, the rule of thumb is: manner-place-time.
Take him with you to Japan via X Airlines before your visa expires.
In the above sentence, via X Airlines is an adjunct of manner and before your visa expires is an adjunct of time. Reversing their order would not be incorrect, but the manner-place-time order is considered the most "normal" order.
I would like to emphasise that this is a rule of thumb and not an actual rule. The writer of the sentence is free to change the order if he would like to, and sometimes the order can be altered without the sentence sounding odd. For matters of emphasis, people can also deviate from this rule of thumb. If you would like to emphasise that the person should be taken via X Airlines and not just any other airline company, then this should be the order of your phrases:
Take him to Japan with you before your visa expires via X Airlines.
Back to the complements! In your sentence, either order is correct. Emphasis is what you should look at. If you want to emphasise one of the two complements, put that one in final position.
Note that adverbs (be it an adjunct or a complement) are not placed between the verb and the object:
- Take to Japan him with you.
- Take with you him to Japan.
The above two sentences are not correct. Adverbs (be it an adjunct or a complement) can be placed in many places, but not between the object and the verb. Have a look at the website of the Cambridge Dictionary that I linked earlier for a more elaborate explanation on adverb positioning. Bear in mind that that article is not specifically about prepositional phrases as adverbs, but about adverbs in general.
Many thanks to Araucaria for helping me answer this!