input: Write a python function to find words that are present in both input strings.
  assert find_words_in_both("This is a string of text", "This text is also a string") == ["This", "is", "a", "string", "of", "text"]
  assert find_words_in_both("apple orange banana", "banana grape apple") == ["apple", "banana"]
  assert find_words_in_both("hello world", "goodbye world") == ["world"]
output: def find_words_in_both(str1, str2):
      set1 = set(str1.split())
      set2 = set(str2.split())
      common_words = list(set1.intersection(set2))
      common_words.sort(key=lambda word: (str1.split().index(word), str2.split().index(word)))
      return common_words