I want to learn how to play the bass but I don't have enough space for a bass amp (or money). So I had this idea..

I thought I could modify my guitar amp for playing the bass as well by putting an extra bass speaker inside it. I only need low db cause it's for practice only not for gigs so I can buy a small speaker that fits inside my amp, then I would connect the two speakers with a switch so that you canselect which of the two you want to use.

Now I have a couple of questions.. First of all would the low frequencies coming out from the bass speaker do any harm to the guitar speaker since they will be very close to each other? Secondly is there any way (that doesn't require much knowledge of electronics and circuits) to connect the bass speaker so that the effects of the amp can be used for the bass as well? If you have any further ideas that can make my project easier or better please tell me, I could use some help!
I'd just grab a cheap 1x15 bass cab with enough wattage for your amp, unplug the stock speaker and plug in the bass cab.
I don't give a shit if you listen to me or not
You don't mention which amp you currently have so hard to give specifics. Generally, if you keep the volume low you can use a guitar amp without issue. Once you start turning it up and pushing amplifier and speaker design limits you might break something. The higher the wattage the more likely the breakage.

I have done bass recordings with a Princeton Reverb (12w 10" speaker) at low volume and it sounded pretty good and worked fine. The piece just needed a simple walking bass line and not a big thunderous slap fest.