First two axioms of directed sets readily follow for $(B,\leq)$ by the virtue of being a subset of $(A,\leq)$ but I don't see how the third one follows.
Directed set $(A,\leq)$ is a set with the order relation $\leq$, where the order relation $\leq$ is reflexive, transitive and that every pair of elements has an upper bound in $(A,\leq)$.
By "$B$ is cofinal in $A$.", I mean, that each element of $A$ is bounded above by some element of $B$.
Best Answer
Since $\leq$ is a partial order on $A$, it is a partial order, by restriction on any subset; this is a property of partial orders, directed or not.
Let $b_1,b_2\in B$. Since $A$ is directed, there exists $a\in A$ such that $b_1\leq a$ and $b_2\leq a$. Since $B$ is cofinal in $A$, there exists $b\in B$ such that $a\leq b$. Thus, there exists $b\in B$ such that $b_1\leq b$ and $b_2\leq b$. Hence, $B$ is directed.