みんなが分かるようにゆっくり話してください

ーようにー can be used show when something is done to achieve an aim.

みんなが分かるようにゆっくり話してください
please speak slowly, so everybody can understand

We have learned that よう is used to show similarity, so this usage to show purpose needs some explaining:

In its simplest use よう(な)does indeed show similarity.

みんなが分かるような言葉
words that everyone can understand
words like those that everyone can understand,
words such as those that everyone can understand

The above phrase can put into a complete sentence.

みんなが分かるような言葉を使ってください。
Please use words that everybody can understand.

よう can also modify the verb directly, in which case it will take に because it is a な adjective

みんなが分かるようにゆっくり話してください
Please speak slowly, so everybody can understand.