Hi Seunghyun Lee,
This is always a confusing topic at some point when we are learning it. I have this very useful link with some examples and how cost will be taken into account when selecting routes, also it is included the rules for inter-area (different areas) or intra-area (same area) route selection, it basically depends on where the destination is located and the type of LSA for that prefix.
> intra area - a route to a subnet or network inside the same area as the router. LSA type 1 and 2 fall in here / router and network LSAs
> inter area - a route to a subnet in an area of which the router is not a part. LSA tpe 3 falls in here / summary LSAs
I hope this link helps you understanding more this behavior:
OSPF inter-area and intra-area routing rules
https://cciethebeginning.wordpress.com/2015/01/21/ospf-inter-area-and-intra-area-routing-rules/
it is not possible to select Inter Area route over Intra Area route or External routes over inter/intra area route for an OSPF process.
RFC2328, Section 11 explains the order of preference which is:
1) Intra Area
2) Inter Area
3) External routes E1
4) External routes E2
https://tools.ietf.org/html/rfc2328
Hope it helps, and good luck comprehending the material, feel free to ask more if you need to, I will try to help as needed.
Cheers,
Benjamin