Example of two subrings with unity of a ring with unity whose intersection is non trivial and has no unity. I was just thinking about the intersection of rings and this question popped up, I tried giving an example and proving that the intersection had to have an unity, but was unsuccessful in both.
 A: edit: As Gerry suggests, it's pedagogically wise to explain that the definition of 'subrings with unity' almost universally requires that the unit element in the ring is also the unit element of the subring. In that case, there is a unique unit element in any subring, and the intersection of any set of subrings will, by definition, contain that unit element.
I took the question to be asking about the weaker definition of subrings (a subset which is itself a ring - i.e. closed under the ring operations) which as individual rings have their own unit elements.
In other words, why do we require 'subrings' to contain the ring's unique unit element? What subrings (in the weaker sense) that have their own individual unit elements have an intersection without a unit element?

Take $A$ to be the continuous functions from $\mathbb R \to \mathbb R$. The unit element here is the constant function $f(x) \equiv 1$. 
$B$ is the set of (all) functions $f:\mathbb R \to \mathbb R$ with $f(0)=0$. The unit element here is 
$$1_B(x) = \left\{ \begin{array}{ll} 0 & \text{if } x=0 \\ 1 & \text{otherwise} \end{array} \right.$$
If $h$ is in $A\cap B$ and is not identically 0 then there is some value $x\in \mathbb R$ for which $h(x) \not\in \{0,1\}$. Then $h^2 \not= h$ so $h$ is not the identity in $A\cap B$.
