>>767
data Where = Before | Here | After

whereIncluded :: (Eq a) => [a] -> [a] -> a -> Where
whereIncluded _ [] _ = After
whereIncluded (a:as) (b:bs) x
| x == b = Here
| x == a = if elem x bs then Here else Before
| otherwise = whereIncluded as bs x

[説明]
・listA と listB それぞれの head と x を比較する
・listB の head と x が同じなら、x は listB に含まれる
・そうではなく listA の head と x が同じ場合、
 x が listB に含まれていなければ、x は後方にある
・どちらの head とも異なっていれば、両者の tail に対して同計算を繰り返す
・計算を繰り返した結果 listB の tail が空なら、x は後方にある

提示された条件を全て完全に満たすものとして式を書いたので、
エラー処理は省いてある