Formal algorithm to test whether two given regular expressions define equal/identical or unequal languages I'm trying to create a formal algorithm in order to determine whether
  two given regular expressions $a$, $a'$ define identical/equal or
  unequal languages and if those languages are subsets of each other?


(I'm not sure if following thoughts are correct and formal enough and I'm glad if you spot mistakes and improve my algorithm.)

Let $a$,$a'$ be regular expressions. Now, we want to determine: $$\bigg(L(a)=L(a') \text{ or } L(a)\neq L(a') \text{ and } \Big((L(a)\subset L(a') \text{ or } (L(a')\subset L(a)\Big)\bigg)$$

In order to do that, we will "convert" the regular expressions $a$ and $a'$ into DFA's $M$ and $M'$. Those automatons have minimal and non-redundant states $K=\{q_1, \cdots ,q_n\}$ and $K'=\{q_1, \cdots ,q_m\}$ with $n,m \in \mathbb{N}$. 

Now, we can simply determine, whether $K=K'$ with showing $K\subseteq K'$ and $K' \subseteq K \implies K=K' \implies L(a) = L(a')$. 
If the above equation is not true, then we can imply that $K\neq K' \implies L(a) \neq L(a')$.  Furthermore, with $K\neq K'$ and $K \nsubseteq K'$ and $K'\subseteq K \implies K' \subset K \implies L(a')\subset L(a)$.
Analogue: $K\neq K'$ and $K' \nsubseteq K$ and $K\subseteq K' \implies K \subset K' \implies L(a) \subset L(a')$ .

Is this enough or do I need to compare final states, transfer function and the alphabet in order to be sure $L(a)=L(a')$ etc.?
If behaviour of the automaton didn't depend on the final states, transition function and alphabet, why would we define automata to have those useless things?