Perseverance is an obstacle that involves never giving up, maintaining a positive attitude, and the ability to trust others.

how can this be written in parallel structure?

First of all, who wrote that? It's incorrect. Perseverance is not the obstacle; it's the act of sticking something out, never giving up.

Anyway ...

The part of the sentence that needs parallel structure is the series at the end. This sentence's series is like this:

never giving up (present participle)
maintaining... (present participle)
the ability to trust others (noun and prepositional phrase)

You need to make that last part of the series so it matches the other two -- that is, rewrite it so there's a present participle there (-ing on the verb).

Give it a try and let me know what you think.

It's suppose to be incorrect that is why we have to rewrite each sentence correctly and use parallel structure.

To write this sentence in parallel structure, you would need to ensure that all elements are written in a consistent grammatical form. Here's an example of how you can achieve parallelism in the sentence:

Perseverance involves never giving up, maintaining a positive attitude, and placing trust in others.

In this revised sentence, all the elements (never giving up, maintaining a positive attitude, and placing trust in others) are written as gerunds, which are noun forms ending in "-ing." This maintains parallel structure by making sure all elements in the list have the same grammatical form.