"Péter sees tourists in front of the building."
Translation:Péter az épület előtt lát turistákat.
Yes, the first one is completely correct. Here you emphasize WHAT Péter sees - namely the tourists.
Your second sentence somehow sounds very strange to me - though I'm not quite sure if it is wrong. However, I as a native Hungarian speaker would never say that. If you put the verb "lát" in front of "az épület előtt" (=> Péter turistákat lát az épület előtt), it would work.
Sure, it consists of four parts.
- The subject Péter in the nominative case.
- The verb lát
- The object, turistákat, which is marked by the accusative case (plural), and
- An adverbial phrase, az épület előtt, which tells where the tourists are seen ("in front of the building"). This phrase needs to stay glued together as one unit in exactly this order; otherwise it won't make sense.
As long as you don't break up the adverbial phrase, a lot of orderings of the four units are possible. Not every order is possible, and the order may change the emphasis of the sentence. Generally, whatever comes immediately before the verb is emphasized.
The given version, Péter az épület előtt lát turistákat, tends to emphasize the adverbial phrase: you're trying to tell the listener WHERE he sees the tourists, or pointing out the location.
Some other possibilities besides the given translation...
Péter lát turistákat az épület előtt emphasizes the subject; you're trying to tell the listener WHO sees tourists in front of the building.
Péter turistákat lát az épület előtt emphasizes the object: you're telling the listener WHAT he sees in front of the building. Péter az épület előtt turistákat lát is another order that achieves the same thing.
Those are probably the most plausible orders.