Both metformin and sitagliptin are used to improve blood sugars levels in people with type 2 diabetes, however they both work in different ways.
When you eat a meal your body will release insulin to help the energy released from the food move into your body's cells where it can be used. People with type 2 diabetes have chronically high blood sugar levels because their body has become resistant to the effect of insulin. Metformin works to reduce the amount of sugar circulating in the blood by increasing the amount your liver takes up for storage, and helps your body use the sugar better.
Sitagliptin works differently. In response to eating your body also produce a hormone called incretin. Incretin works to increase the amount of insulin in the body. Sitagliptin inhibits the breakdown of incretin hormones, thereby increasing the amount of insulin in the blood and thereby reducing blood sugar levels.
As people who have type 1 diabetes don't produce insulin naturally, sitagliptin is not useful in type 1 diabetes. Metformin is occasionally used in type 1 diabetes, but it is not very common these days.
Mayo Clinic, Sitagliptin and Metformin