Yes, they will ‘fit’.
However, those are pretty cheap Chinese knockoff Jagwire cables and housing. In my experience, the housing works fine but the cables are junk.
Better to use real Shimano stainless cables for both brake and shifter. They will last a decade.
__________________
Hard at work in the Secret Underground Laboratory...