Let B be a commutative algebra and A be a B-algebra (determined by an algebra homomorphism ε : B → A). M. D. Staic introduced a Hochschild like cohomology H • ((A, B, ε); A) called secondary Hochschild cohomology, to describe the non-trivial B-algebra deformations of A. J. Laubacher et al later obtained a natural construction of a new chain (and cochain) complex C•(A, B, ε) (resp. C • (A, B, ε)) in the process of introducing the secondary cyclic (co)homology. It turns out that unlike the classical case of associative algebras (over a field), there exist different (co)chain complexes for the B-algebra A. In this paper, we establish a connection between the two (co)homology theories for B-algebra A. We show that the pair H • ((A, B, ε); A), HH•(A, B, ε) forms a noncommutative differential calculus, where HH•(A, B, ε) denotes the homology of the complex C•(A, B, ε).