How long have you had it?
Gear cables will stretch over time (especially in the first few months) and that can cause the sort of problems your having with the rear derailleur.
The chain coming off the front when you move to the big ring just needs the limit screw adjusted.
Here is a guide for adjusting the front derailleur. Ignore the bits about setting the height and rotation, just scroll down to the bit about setting the limit screws. It's quite as easy thing to do.
Gear cables will stretch over time (especially in the first few months) and that can cause the sort of problems your having with the rear derailleur.
The chain coming off the front when you move to the big ring just needs the limit screw adjusted.
Here is a guide for adjusting the front derailleur. Ignore the bits about setting the height and rotation, just scroll down to the bit about setting the limit screws. It's quite as easy thing to do.


either that or you've bent the outer plate of the front mech with a bad shift which then allows the chain to fall off the big ring. Rear gears is probably just cable tension that needs sorted.
The bike has probably done only about 300 miles so far.